- In the calling function replace 'uiwait(hApp.selectFiles)' with 'uiwait(hApp.UIFigure)'
- Generate a button called 'close' in the app and add a callback involving uiresume(app.UIFigure).
- Read out the needed data in the calling function (usually with hApp.<name>.Value).
- If the app interface is no longer needed call additionally 'hApp.delete'.
How do you output App data to a calling function?
1 回表示 (過去 30 日間)
古いコメントを表示
I have a function/script that calls an instance of an App I created in AppDesigner. How do I get the App to return data to the function/script upon closing the App?
hApp = selectFiles_v0000; % call to open App within the function/script
importInfo(hApp,trajectoryDirectory,'.nc') % necessary to import function data into the App since I only have Matlab 2016b and do not have the ability to have a StartUpFcn with inputs
uiwait(hApp.selectFiles);
% need to have data from the App available in the function/script at this point
0 件のコメント
採用された回答
crixstox
2018 年 7 月 23 日
I had a similar probelm and made the following work around.
I hope this helps.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!