フィルターのクリア

Multiple linked callback functions

1 回表示 (過去 30 日間)
Luis Eduardo Cofré Lizama
Luis Eduardo Cofré Lizama 2020 年 9 月 24 日
回答済み: Priyanka Rai 2020 年 10 月 13 日
Hi All, I am new in app designer and I am trying to run a "2 steps" app. The first part calculates my outcomes (running fine) and the second part needs to use some of these outcomes to perfrom some further calculations. How can I save/pass/link the outcomes produced to be part of the second callback function?. I tried creating a structure whithin the first callback function, for example, app.var1 = outcome1, however doesnt work and gives the following error "unrecognized property 'var1'...". An y suggestions how to do it?
Cheers
Eduardo

採用された回答

Priyanka Rai
Priyanka Rai 2020 年 10 月 13 日
Using properties is the best way to share data within an app because properties are accessible to all functions and callbacks in an app.
However, if you want to share an intermediate result, or data that multiple callbacks need to access, then define a public or private property to store your data. Public properties are accessible both inside and outside of the app, whereas private properties are only accessible inside of the app.
All UI components are properties, so you can use this syntax to access and update UI components within your callbacks:app.Component.Property”
You may want to use this documentation link for your detailed understanding:

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by