Why is uiconfirm freezing my application?

1 Ansicht (letzte 30 Tage)
Dominik Mattioli
Dominik Mattioli am 22 Okt. 2020
Kommentiert: Dominik Mattioli am 22 Okt. 2020
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)
In matlab.ui.internal.dialog.ConfirmDialogController/destroyListeners (line 65)
In matlab.ui.internal.dialog.DialogController/closeCallback (line 45)
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)
  2 Kommentare
Walter Roberson
Walter Roberson am 22 Okt. 2020
Bearbeitet: Walter Roberson am 22 Okt. 2020
Your handleDialog is preventing the CloseFcn from returning, I suspect.
Dominik Mattioli
Dominik Mattioli am 22 Okt. 2020
I pulled the 'handleDialog' bit from the documentation. The same thing occurs without specifying a closefcn. Could there be some figure property that I am accidentally messing with?

Melden Sie sich an, um zu kommentieren.

Antworten (0)


Mehr zu Maintain or Transition figure-Based Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by