Passing data between UIFigures
Mostrar comentarios más antiguos
Hi. I'm building a program by app designer that has 3 different window. My quesiton is, how I can share data and variables between them?
1 comentario
Adam
el 21 de Nov. de 2017
Since AppDesigner is based on classes it is very easy to just set data from one in another, but you haven't given any details of how you create your windows so a generic answer is far too vague and time-consuming.
Respuestas (2)
Adam
el 22 de Nov. de 2017
app2.R = R;
would work if you just want R, you don't need app1, but equally:
app2.field3 = app.field3;
for example would also work, though you should name properties as descriptively as possible.
Obviously whatever you choose you must define the property in app2.
4 comentarios
Muslim Danesh
el 25 de Nov. de 2017
Fei Gao
el 22 de En. de 2019
How can I change the class name of the second UIFigure? The names of the second UIFigure and *.mlapp can be renamed, e.g. 'app2', but the class name is also 'app', the same as the first one, and can not be changed. All properties in the second UIFigure are alsso called as 'app.*', e.g. 'app.R'.
Adam
el 22 de En. de 2019
Within a given UI class in App Designer the object itself is usually referred to as app, but in a your own function you can call it whatever you want and when you create your two GUIs you will give them each your own name that is used external to the object.
e.g.
myApp1 = App1( );
myOtherApp = App2( );
myApp1.someProperty = someValue;
myOtherApp.someOtherProperty = someOtherValue;
Fei Gao
el 22 de En. de 2019
Thank you! I got it.
Muslim Danesh
el 21 de Nov. de 2017
1 comentario
Amir Abedin
el 4 de Jul. de 2020
did you find the answer?
Categorías
Más información sobre Data Type Identification en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!