How do I set the last handle to be applicated
2 次查看(过去 30 天)
显示 更早的评论
Hi there, It is hard to describe the problem that I faced but I will try to explain it as simple as I can. I am designing an interface with GUI that has five different applications.
The situation is simple. First I call/open a file with a push button, then I use it for five different/independent applications. For instance I use the file that I called for the first application. Then I look for the second application. In that second application the code uses the original file (when I first called) and does the application for it. What I want to do is that when I go through the second application, I want to use the result of the first application (not the original one!). So when I reach the last application (5th app), thus all the applications will be used.
The order in the 5 applications can be random like first I may use the 5th application then I continue with 3rd application with the result of 5th app.
When I was forming the code I just used "handles.work=work" when I open the file. Then when I go through the apps I used for example "work1=handles.work" to call the file. This is why I use the original file every time. How can I fix that?
Thanks...
0 个评论
回答(2 个)
Walter Roberson
2014-5-14
handles.work = 'original file';
...
handles.currentwork = ....; %change it
guidata(gcf, handles); %update handles
...
handles = guidata(gcf); %fetch current handles
work = handles.currentwork;
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!