App to app transfer
4 次查看(过去 30 天)
显示 更早的评论
I want to transfer the number 2 from app1 to app2 with a button push, how can that be done.
0 个评论
回答(2 个)
Adam Danz
2020-5-4
编辑:Adam Danz
2020-5-4
Presumably the value 2 is stored somehwere in app1, either in a UI component or as a property.
To exchange any value between two apps, you need to access the app handle of app2 from app1 (or vise versa). Here's a demo to get access an app handle from within another app. Also see Matlab's documentation on multi-window apps.
1 个评论
Adam Danz
2020-5-5
编辑:Adam Danz
2020-5-6
" I open app2 from app1 on a button click (Works fine). Now I want to to access what ever M equals in app1 from app2"
@Stephen Wilkerson , I'll reply to your answer here. Let's use the comment section for discussion and reserve the answer section for solutions.
The 2nd link I shared above to the documentation shows you exactly what you need to do step-by-step. See the Send Information to the Dialog Box section.
Another option is to follow the steps in the 1st link I shared above. See Find the handle to an app that's already opened. Once you have the handle, you can access anything from within the app.
I can't work with your app files now because my computer is running a lengthy analysis but try to get one of those ideas rolling and if you get stuck, send an update.
Stephen Wilkerson
2020-5-4
3 个评论
Adam Danz
2020-5-8
If the demo or the mathworks documentation do not make sense to you and you want to understand them, let us know what part is confusing or how it doesn't address your question.
另请参阅
类别
在 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!