Correct Usage of uiwait and uiresume in MATLAB App Designer

44 views (last 30 days)
Vasista Adupa
Vasista Adupa on 19 Jun 2020
Commented: Vasista Adupa on 19 Jun 2020
I am really having confusion where to place this both commands `uiwait` and `uiresume`
I am using app designer in matlab. and I am having this GUI in the middle of the code, so for the program to stop until this GUI complete, I am using these commands.
I tried placing
`uiwait` in `app startupFcn`
function startupFcn(app)
uiwait(app.UIFigure)
end
And `uiresume` in
function UIFigureCloseRequest(app, event)
uiresume(app.UIFigure)
delete(app)
end
But ended with errors
`Error using getappdata Value must be a handle`
My GUI will close when I press a Button because I assigned `closereq` at the end of that Button callback function.
Let me know if any further info is needed.

Answers (1)

Ajit Kasturi
Ajit Kasturi on 19 Jun 2020
  2 Comments
Vasista Adupa
Vasista Adupa on 19 Jun 2020
For now, I am using this as a work around.
a = 150;
b = 200;
rolls =zeros(1)
APPINFO = matlab.apputil.install('./APP/app');
matlab.apputil.run('appAPP')
while isequal(rolls,zeros(1)) == 1
pause
end
c = a+ b + rolls;

Sign in to comment.

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!