Define Possible Values ​​for a Property in Flex

In Flex, you can include some type of MetaData in the property to be able to list all the possible values ​​that the property can use? I want to be able to list values ​​when invoking a property from MXML, as in the case, for example, of a property is allowed or visible, where the user gets a list of "true / false".

+3
source share
1 answer

Use the Inspectable metadata tag . In your case, you need to explicitly use the enumeration attribute.

[Inspectable( enumeration="one,two,three" )]
public var myProp:String;
+3
source

Source: https://habr.com/ru/post/1711723/


All Articles