App to app transfer

조회 수: 4 (최근 30일)
Stephen Wilkerson
Stephen Wilkerson 2020년 5월 4일
댓글: Adam Danz 2020년 5월 8일
I want to transfer the number 2 from app1 to app2 with a button push, how can that be done.

답변 (2개)

Adam Danz
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
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
Stephen Wilkerson 2020년 5월 4일
I really appreciate the help.
I'm going to plead complete confusion. I have app1 and I've created a global public variable M = 1 that might be changed in the program. 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. For the life of me I don't understand what that has to do with a UI figure component. I've tried so many things I'm not even sure what all is in here, but it's only a line or two of code.
Thank you again
Drew
  댓글 수: 3
Stephen Wilkerson
Stephen Wilkerson 2020년 5월 8일
The solution given make no sense. Sorry.
Adam Danz
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 CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by