Accessing app structure within function in an application built with appdesigner
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!