Accessing app structure within function in an application built with appdesigner
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I am building a GUI where I have several controls with their respective callbacks. In the callbacks I call several purely analytical functions. My question is philosophical. I would think that I should only allow the callbacks to have direct access to the app structure. I think of this much like a global variable or structure. With that as my paradigm I've always found it to be a poor practice to allow purely analytical functions to manuipulate global constructs. Not only that, but if I manipulate the app within a function, I can't reuse that function in other applications. I also tend to think of the app structure as being the GUI heap. Isn't it a bad idea to have the heap flying around all the callback functions and other methods in the parameter list. The function stacks can get pretty large and I'm not certain calling a function with a reference to the app is wise. I'm somewhat new to GUI development so allow for my ignorance in that area.
So I think I should keep app access limited to callbacks, particularly when it involves altering graphics objects.
I'd like to hear other opinions on this.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!