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

4 次查看(过去 30 天)
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 个评论
Sandeep Mishra
Sandeep Mishra 2024-8-7
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 2024-10-10
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 :)

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by