multiple instances of gui open at once
4 次查看(过去 30 天)
显示 更早的评论
Hello,
I created a GUI that asks the user for several parameters before running a model. I give the user the option to save a specific run to use later. I use the hgsave(filename) function. But when the user opens the saved run, 3 instances of the GUI appear.
I can just close 2 of them and the 1 works fine, but I'd really like to stop 3 from appearing before giving the model to my users. Anyone have any ideas? I don't even know where to start debugging this problem. I never had this problem in R2014a but since graphics handles were changed to objects (R2014b or higher), I have duplicates
Thanks
5 个评论
Jan
2015-10-26
Why do you save the complete GUI? It sound like you want to save the value of the UICONTROLs only. You observe the side-effects and they disturb you. So avoid the side effects by choosing a method, which does not have it: Save the user-defined values of the uicontrols only.
回答(2 个)
Jan
2015-10-26
Bold guessing: The problem is inside the code, which is processed for "user opens the saved run". So set a breakpoint there and stept throught your code line by line. You will see, which lines open the unwanted figures.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!