필터 지우기
필터 지우기

Stop the pause(inf) from GUI or callbacks?

조회 수: 1 (최근 30일)
Minggui Chen
Minggui Chen 2016년 1월 19일
댓글: Walter Roberson 2016년 1월 19일
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?

채택된 답변

Walter Roberson
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
Minggui Chen
Minggui Chen 2016년 1월 19일
Thanks, Walter. I do not want my GUI to be closed. I want both of them are there so that it is possible to switch between these two components. Waitfor seems to be not suitable for this purpose. Do you have any other suggestion? Thanks again.
Walter Roberson
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 CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by