Clear Filters
Clear Filters

Is properties like global variables?

9 views (last 30 days)
Muazma Ali
Muazma Ali on 21 Feb 2023
Answered: chrisw23 on 22 Feb 2023
Hi! :)
Is properties in matlab app designer like global variables in matlab program? I am a little confused..

Answers (2)

Matt J
Matt J on 21 Feb 2023
Edited: Matt J on 21 Feb 2023
No, they are not like global variables. They are attached to the app object used by the callbacks and must be accessed similarly to structs:
app.property1=...
app.property2=...
  1 Comment
Walter Roberson
Walter Roberson on 21 Feb 2023
Also the object class can be designed to restrict read or write access (though I am not sure how much support App Designer provides for this)

Sign in to comment.


chrisw23
chrisw23 on 22 Feb 2023
see the first line of a mlapp file
classdef app1 < matlab.apps.AppBase
Each AppDesigner app is nothing more than a class definition following the same rules.

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!