Stop the pause(inf) from GUI or callbacks?
1 次查看(过去 30 天)
显示 更早的评论
Hi All
I am writting a program with GUIs and other computations runing nearly simultaneously. After my computation is done, I want to pause the main matlab thread forever. This will let my GUI updating completely without any delay. And then if the GUI or other callbacks want to start another round of computation, GUI can stop the pause(inf) within the callback. I tested several ways to stop pause(inf) from callbacks, including pause('off'), pause(0.1), drawnow etc. But they have no effect! Could anyone let me know how to do this?
0 个评论
采纳的回答
Walter Roberson
2016-1-19
Do not do it that way. waitfor() the figure handle instead. The waitfor() will not return until the figure handle is deleted.
2 个评论
Walter Roberson
2016-1-19
waitfor() a handle property to change or to change to a particular value. The GUI would set the appropriate handle property when it was requesting a resumption.
更多回答(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!