check if mainAPP exist in app designer
Mostra commenti meno recenti
hi, i read this guide :
i want to know if Main App has been launched.. otherwise I launch it from here
5 Commenti
Typically the main app starts a child app and hold its app instance. If the main app will be closed the child app should be closed too by the close callback.
properties (Access = private)
childApp % declare private property
end
...
app.childApp = ChildApp(<arg>) % start child app somewhere
...
function CloseRequest(app)
app.childApp.delete % close the child app first
app.delete % close the main app
end
chrisw23
il 20 Giu 2023
Sry, but you mentioned that you have to start your main anyway. If it's not yet open "... otherwise I launch it from here"
chrisw23
il 20 Giu 2023
Since Matlab R2020 you have the option to set the 'Single Running Instance' flag. Maybe this is a workaround for your problem.
"When Single Running Instance is selected and you run the app multiple times, MATLAB reuses the existing instance and brings it to the front rather than creating a new one. When this option is cleared, MATLAB creates a new app instance each time you run it and continues to run the existing instances. These run behaviors apply to apps that you run from the Apps tab on the MATLAB Toolstrip or from the Command Window.
When you run apps from App Designer their behavior doesn't change whether this option is selected or cleared. App Designer always closes the existing app instance before creating a new one."
piero
il 20 Giu 2023
Risposte (1)
Walter Roberson
il 20 Giu 2023
1 voto
No. MATLAB does not offer any any general mechanism to test whether variables of particular classes exist.
1 Commento
piero
il 20 Giu 2023
Categorie
Scopri di più su Develop Apps Using App Designer in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!