Clear Filters
Clear Filters

Using MATLAB app after cascaded call of other MATLAB app not possible anymore

31 views (last 30 days)
Hallo togehter,
I have the following problem: I coded a application with the help of the MATLAB app designer (Lets call it main app). Within this application user imports are quite commen. Therefore with pushing a button within the app a new application created with the MATLAB app designer is openend (lets call it second app). Within the second app a additional user import is necessary to get all the information the second app should collect. So by pushing a button within the second app a additional app designed with the app designer is executed (lets call it third app). Now I face the problem, that after the user performed all necessary task within the third app and pushind the export button the third app gets closed but I can not access the second app. It of course still appears but I hear only the error sound if a try to push a button or change a value of a edit field within the second app.
In general I call the cascaded apps (in the callback function of the main and second app) like this:
app_new_SecondApp = SecondApp();
waitfor(app_new_SecondApp);
I tried to face the problem with the following additional code within the callback function of import button pushed within the second app:
app_UserDialog = Interface_UserDataImport();
waitfor(app_UserDialog);
delete app_UserDialog;
app.SecondAppUIFigure.RunningAppInstance.SecondAppUIFigure.HandleVisibility = "on";
set(0,'CurrentFigure',app.SecondAppUIFigure.RunningAppInstance.SecondAppUIFigure);
drawnow;
pause(1);
With this code I could force the second app to be the current figure (gcf) and not the main app. But still no interaction with the second app is possible.
Everything works fine if I only execute the second app without the step by pushing a button in the main app.
Can anybody help me?
Thanks a lot!
  3 Comments
Divyanshu
Divyanshu on 31 Jul 2024 at 9:53
Hi Nicolas,
I tried to create a 3-layer cascaded app using App-Designer and each app has a push-button which when clicked opens another app. I also tried to upload some file using uigetfile() but was not able to reproduce the issue. Can you share your .mlapp files or some dummy apps where the issue is reproducible?
Sandeep Mishra
Sandeep Mishra on 7 Aug 2024 at 12:31
Can you please share more insights about how you are trying to open the another app from one app, the uigetfile complete function code? or share the .mlapp files?
It will help community in reproducing the issue.

Sign in to comment.

Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!