3

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

thorseye
  • 237
  • 6
  • 16

1 Answers1

3

Use the Inspectable metadata tag. In your case you'll want to explicitly use the enumeration attribute.

[Inspectable( enumeration="one,two,three" )]
public var myProp:String;
darronschall
  • 859
  • 5
  • 7