フィルターのクリア

How to pass data from App to calling function on App close?

2 ビュー (過去 30 日間)
Chris Nemecek
Chris Nemecek 2018 年 6 月 12 日
回答済み: Abhinav 2023 年 7 月 5 日
I have a function that calls an App made in App Designer. Essentially, the app is a more sophisticated file selection tool than uigetfile(). I would like to have the app pass data back to the calling function when the app is closed. How do I do this?
function s = xyz()
hApp = selectFiles; % selectFiles is the App
importInfo(hApp,x,y) % importInfo is a public function of selectFiles and imports data from the calling function to the App
uiwait(hApp.selectFiles) % pause calling function while App is running
end
On closing selectFiles, I would like to pass data generated in selectFiles to the calling function.

回答 (1 件)

Abhinav
Abhinav 2023 年 7 月 5 日
Link to Documentation for sharing data between different apps.
But since in this case your function is making the call to an app, you could dump the value you want to use later into the workspace, and use it later. You could use assignin() to move your data to the workspace .

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by