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

4 vues (au cours des 30 derniers jours)
Nicolas Kaiser
Nicolas Kaiser le 17 Juil 2024
Commenté : Nicolas Kaiser le 10 Oct 2024
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!
  4 commentaires
Sandeep Mishra
Sandeep Mishra le 7 Août 2024
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.
Nicolas Kaiser
Nicolas Kaiser le 10 Oct 2024
Hi, sorry for the late response. But I could solve the problem relatively fast by just making the first not used app invisible. Hope that can help some people :)

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by