Macromedia flex 2 Manual
202
Creating Template Components
Defining an array of template properties
You can define an array of template properties, as the following example shows:
// Define an Array of deferred properties for a row of components.
// Do not restrict the type of the component.
[ArrayElementType("mx.core.IDeferredInstance")]
public var bottomRow:Array;
// Do not restrict the type of the component.
[ArrayElementType("mx.core.IDeferredInstance")]
public var bottomRow:Array;
// Define an Array of deferred properties for a row of components.
// Restrict the type of the component to mx.controls.Button.
[InstanceType("mx.controls.Button")]
[ArrayElementType("mx.core.IDeferredInstance")]
public var bottomRow:Array;
// Restrict the type of the component to mx.controls.Button.
[InstanceType("mx.controls.Button")]
[ArrayElementType("mx.core.IDeferredInstance")]
public var bottomRow:Array;
In the first example, you can assign a value of any data type to the bottomRow property. Each
array element's
array element's
getInstance()
method is not called until the element is used.