|Re: [Xcore] Default value for multi-valued enum attributes [message #1777922 is a reply to message #1777915]
||Wed, 06 December 2017 08:23
| Ed Merks
Registered: July 2009
If you want defaults, yes. Alternatively you could do something like this:|I.e., define an data type that's a list of enum values and then use that to define a single-value attribute with a default. Unfortunately this Xcore file has a warning about the use of the raw List type. And of course you should not modify the result of getValues() but rather call setValues with a new list to modify the value. You could also define a data type for List<Value> but in that case you have to implement the create/convert methods for that data type.
ValueList values = 'VALUE1 VALUE2'
type ValueList wraps List
Professional Support: https://www.macromodeling.com/
Powered by FUDForum
. Page generated in 0.01553 seconds