Effacer les filtres
Effacer les filtres

matlab app designer where is the workspace?

178 vues (au cours des 30 derniers jours)
Robert Scott
Robert Scott le 1 Août 2021
Commenté : Image Analyst le 2 Août 2021
ok so im a bit confused. I used the old version of this some years ago.
In the old app guide you had access to variables in your work space and could debug the app as normal.
If i for example have a simply app that does nothing but return the sum of somthing and have a variable called sum.
Where is that? I dont see a workspace where its kept?
How do i debug this thing if i dont have access to the workspace variables?
Any ideas?

Réponse acceptée

Sylvain
Sylvain le 1 Août 2021
HI Robert,
my own technique is to add a push button call debug. The callback of the push button uses the function assign('base','VariableName',VariableToExtract). This allow to get the data from the app into the workspace.
Depending on how you coded the app, the VariableToExtract may be found in app.ObjectParent1.Object.PropertyToExtract. Or similar.

Plus de réponses (1)

Image Analyst
Image Analyst le 1 Août 2021
Robert,
Yes, this is what I've been complaining to them about for years. I've even talked in person to the developers in Natick about it and they know my views and why this is a complete show stopper for me moving to App Designer.
I'd happily move to App Designer because it has some nice things about it, like more advanced widgets/controls, but having the Current Folder, Command Window, and the Workspace panel in a separate app (the main MATLAB IDE) and the GUI designer and source code in a separate app (App Designer) is a total deal breaker for me. I can't be thrashing windows all the time when I want to debug. It might be OK for people with two monitors (MATLAB IDE on one monitor, and App Designer on the other monitor), but for those of use with laptops, or who prefer a single monitor, it's a total deal breaker.
If I were you I'd call them on the phone and complain. Please, please do this. The more of us that complain, perhaps the quicker they'll fix it. I think they understood my complaints but I don't know how much of an effort it is to fix it. Frankly I don't even know if they will fix it -- they just said they understood my complaints and understand how it's a hinderance to a productive workflow. Every release I check, but no luck so far.
Until they fix it, you're stuck with dealing with two separate apps and thrashing over to the "correct" window when you want to do something. A real pain, I know, believe me.
  5 commentaires
Robert Scott
Robert Scott le 2 Août 2021
so i agree with you
However, with some modified workflow i have made it work for my simplistic design. Although its not great when you need to debug something
My biggest issue as stated in my other thread, i cant get it to update real time.
For example, all im trying to do is get it to print out the index of a loop and it wont do it while the loop is running but does it after the loop is competed. If i can figure that out i think i am good to go for a while
Image Analyst
Image Analyst le 2 Août 2021
Wow - another reason for me to hate App Designer. Are you just putting the loop counter on its own line without a semicolon, using disp(), or using fprintf()? You might try it all three ways and see if one of them works.
Or you might try the drawnow command.
drawnow;
It works very well for updating GUIs. I'm just not sure if it will work on the command window panel but it's worth a try.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Graphics Object Programming dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by