Need help with delete(h)

조회 수: 3 (최근 30일)
adi kul
adi kul 2016년 6월 20일
답변: Geoff Hayes 2016년 6월 20일
Hello All, i have a message box like this in my GUI:
h=msgbox('Calculation in progress');
Now I have added delete(h); after the calculation stuff in between these two. My script runs for user defined multiple cases. After completing on the loop I have another message box:
h=msgbox('Calculation Completed');
Now the thing is if someone closes the 1st message box by clicking cross on the window the calculation stops with error. Can you suggest me anything?
  댓글 수: 1
Steven Lord
Steven Lord 2016년 6월 20일
What is the full exact text of the error message?

댓글을 달려면 로그인하십시오.

채택된 답변

Geoff Hayes
Geoff Hayes 2016년 6월 20일
adi - if you are observing the error
Error using delete
Invalid or deleted object.
because the dialog has already been deleted, then try using the ishandle function to check whether the h is valid or not. For example,
if ishandle(h)
delete(h);
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by