I just figured out, that the problem appeared not after calling the third app but after calling the uigetfile dialog. Could it be that the first waitfor in the callback function of the button pushed at the main app is causing the problem?
Using MATLAB app after cascaded call of other MATLAB app not possible anymore
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
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.
Réponses (0)
Voir également
Catégories
En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!