
37ADOBE FLEX 3
Creating and Extending Adobe Flex 3 Components
ArrayElementType metadata tag
When you define an Array variable in ActionScript, you specify Array as the data type of the variable. However,
you cannot specify the data type of the elements of the Array.
To allow the Flex MXML compiler to perform type checking on Array elements, you can use the
[ArrayElementType] metadata tag to specify the allowed data type of the Array elements, as the following
example shows:
public class MyTypedArrayComponent extends VBox {
[ArrayElementType("String")]
public var newStringProperty:Array;
[ArrayElementType("Number")]
public var newNumberProperty:Array; ...