Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual page 60

Creating and extending flex 2 components
Hide thumbs Also See for FLEX 2 - CREATING AND EXTENDING COMPONENTS:
Table of Contents

Advertisement

Property
Type
String
variable
Number
verbose
The following example defines the
[Inspectable(defaultValue=true, verbose=1, category="Other")]
public var myProp:Boolean;
InstanceType metadata tag
The
[InstanceType]
IDeferredInstance, as the following example shows:
// Define a deferred property for the top component.
[InstanceType("mx.controls.Label")]
public var topRow:IDeferredInstance;
The Flex compiler validates that users only assign values of the specified type to the property.
In this example, if the component user sets the topRow property to a value of a type other
than mx.controls.Label, the compiler issues an error message.
You use the
[InstanceType]
information, see
Chapter 12, "Creating Template Components," on page
The
[InstanceType]
[InstanceType("package.className")]
You must specify a fully qualified package and class name.
NonCommittingChangeEvent metadata tag
The
[NonCommittingChangeEvent]
which means that the event should not invoke Flex data validators on the property. You use
this tag for properties that might change often, but which you do not want to validate on
every change.
An example of this is if you tied a validator to the
property changes on every keystroke, but you do not want to validate the property until
text
the user presses the Enter key or changes focus away from the field. The
NonCommittingChangeEvent
validation.
60
Using Metadata Tags in Custom Components
Description
Specifies the variable to which this parameter is bound.
Indicates that this inspectable property should be displayed in the
Flex Builder user interface only when the user indicates that
properties should be included. If this property is not specified, Flex
Builder assumes that the property should be displayed.
parameter as inspectable:
myProp
metadata tag specifies the allowed data type of a property of type
metadata tag when creating template components. For more
metadata tag has the following syntax:
metadata tag identifies an event as an interim trigger,
tag lets you dispatch a change event, but that does not trigger
property of a TextInput control. The
text
verbose
195.

Advertisement

Table of Contents
loading

Table of Contents