The interesting error I occur when I push the two button at the same time.
이전 댓글 표시
In my gui code,there is a pushbutton1_callback function and a pushbutton2_callback function with a for loop and waitbar.
If I push the button2,the pushbutton2_callback will do the loop.Before the loop ends,I also push the button1. Then the pushbutton1_callback function will begin and pushbutton2_callback is paused.When the pushbutton1_callback ends,the pushbutton2_callback begins where it is paused.Also it gives out the error message 'Couldn't find waitbar handles'.
However,if I add the code 'pause(2)' at the end of pushbutton1_callback.The error message would not appear.It's very interesting. Do you know the answer?
댓글 수: 3
Jing
2013년 3월 7일
Is it the same waitbar in those two callback? And did you close it in pushbutton1_callback?
Walter Roberson
2013년 3월 7일
waitbar() has calls to wait for events, so other pushbuttons are allowed to interrupt the process.
QiQin Zhan
2013년 3월 7일
답변 (1개)
QiQin Zhan
2013년 3월 7일
0 개 추천
댓글 수: 4
Walter Roberson
2013년 3월 7일
Which form of waitbar() are you using? Are you passing in the handle to it or are you forcing it to search for the current handle?
QiQin Zhan
2013년 3월 7일
편집: QiQin Zhan
2013년 3월 7일
Walter Roberson
2013년 3월 7일
Please show your waitbar() command.
QiQin Zhan
2013년 3월 7일
카테고리
도움말 센터 및 File Exchange에서 App Building에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!