Why is uiconfirm freezing my application?
조회 수: 2 (최근 30일)
이전 댓글 표시
Regardless of which button the user clicks, MATLAB shows as 'busy' once the confirmation is complete. The same happens with uialert. What am I doing wrong?
fh = uifigure();
q = uiconfirm( fh, 'Click anything to close this:', 'Example', 'Options', { 'Yes', 'No' }, 'CloseFcn', @( o, e ) handleDialog( o, e ) );
% q = uiconfirm( fh, 'Click anything to close this:', 'Example', 'Options', { 'Yes', 'No' } ); % same thing happens without the close function.
Hitting ctrl-c returns this error, repeated several times:
Operation terminated by user during message.internal.MessageService/doUnsubscribe
In message.internal.MessageService.unsubscribe
In message/unsubscribe
In matlab.ui.internal.dialog.DialogController/destroyListeners (line 70)
message.unsubscribe(this.ReloadSubscription);
In matlab.ui.internal.dialog.ConfirmDialogController/destroyListeners (line 65)
destroyListeners@matlab.ui.internal.dialog.DialogController(this);
In matlab.ui.internal.dialog.DialogController/closeCallback (line 45)
this.destroyListeners();
In matlab.ui.internal.dialog.ConfirmDialogController>@(evd)this.closeCallback(evd) (line 56)
this.CallbackSubscription = message.subscribe(this.CallbackChannelID, @(evd) this.closeCallback(evd));
In message.internal.MessageService/doExecuteCallback
In message.internal.MessageService.executeCallback
In message.internal.executeCallback
In uiconfirm (line 96)
waitfor(dc,'SelectedOption');
댓글 수: 2
Walter Roberson
2020년 10월 22일
편집: Walter Roberson
2020년 10월 22일
Your handleDialog is preventing the CloseFcn from returning, I suspect.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Dialog Boxes에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!