Multiwindow app: runStartupFcn does not execute startupFcn on called app
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am writing an app with App Designer, that has a button to call an external app and perform some operations. I followed the instructions provided at Create Multiwindow Apps in App Designer.
I create the external app and tested its correct functioning by using another simple test app I created, containing a single button. I verified that all inputs and outputs are passed correctly between these two apps and that the startupFcn of the external app is correctly executed.
Now I tried to include the call to this external app in a more complex app and I got an unexpected issue: the external app opens, but its startupFcn is not getting executed. I traced the problem to the uneditable part of the external app, executed during the construction of the app:
% Execute the startup function
runStartupFcn(app, @(app)startupFcn(app, varargin{:}))
When I call the external app from the test app this command correctly executes the startupFcn, but when I call it from the more complex app, runStartupFcn does not execute it and does not throw any warning or error message.
I could not find any documentation on runStartupFcn. How this function decides if it executes the startupFcn?
4 commentaires
Walter Roberson
le 31 Juil 2022
Modifié(e) : Walter Roberson
le 31 Juil 2022
runStartupFcn turns on handle visibility for the app, runs the provided function handle, and turns handle visibility off again.
The execution layer is within toolbox/matlab/appdesigner/appdesigner/runtime/+appdesigner/+internal/+service/AppManagementService.m near line 122, and the direct invocation is to toolbox/matlab/appdesigner/appdesigner/runtime/+matlab/+apps/AppBase.m near line 68
There is no documentation for it because it is internal functionality not intended to be invoked directly by the user.
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!