How can I use Structures array the App Designer Properties?
83 views (last 30 days)
Davide Mastrodicasa on 8 Jan 2020
I have a problem using structures in the App Designer properties. I'm new on App Designer and I would like to have some common variables to all the callback functions. In the original script that I'm using, these variables where ordinated in a structure but I'm not able to do the same in the App Designer. The error it is relative to the use of the dot when I write a structure array.
How can I solve this problem and to continue using structures also in App Designer?
More Answers (1)
mansour torabi on 1 Oct 2021
Edited: mansour torabi on 1 Oct 2021
To define a structure variable as a public Propertey in the App Designer, use struct function:
properties (Access = public)
YourPublicVariable = struct('FieldName1',Value1,'FieldName2',Value2);
Then anywehere in the App designer code, your defined variable can be accessed using app variable:
YourValue1 = app.YourPublicVariable.FieldName1;