Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual page 51

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

Advertisement

The following table describes the property of the [
Property
Type
String
elementType
Bindable metadata tag
When a property is the source of a data binding expression, Flex automatically copies the
value of the source property to any destination property when the source property changes. To
signal to Flex to perform the copy, you must use the
property with Flex, and the source property must dispatch an event.
The
metadata tag has the following syntax:
[Bindable]
[Bindable]
[Bindable(event="eventname")]
If you omit the event name, Flex automatically creates an event named
You can use the
[Bindable]
Before a public class definition.
The
[Bindable]
public properties that you defined as variables, and all public properties that are defined
by using both a setter and a getter method. In this case,
as the following example shows:
[Bindable]
public class TextAreaFontControl extends TextArea {}
The Flex compiler automatically generates an event named
properties so that the properties can be used as the source of a data binding expression. In
this case, specifying the
the following:
[Bindable(event="propertyChange")]
If the property value remains the same on a write, Flex does not dispatch the event or
update the property.
When you use the
applies to public properties; it does not apply to private or protected properties, or to
properties defined in any other namespace. You must insert the
tag before a nonpublic property to make it usable as the source for a data binding
expression.
Description
Specifies the data type of the Array elements, and can be one of
the ActionScript data type, such as String, Number, class, or
interface.
metadata tag in three places:
metadata tag makes usable as the source of a binding expression all
metadata tag with no event is the same as specifying
[Bindable]
metadata tag before a public class definition, it only
[Bindable]
ArrayElementType]
metadata tag to register the
[Bindable]
[Bindable]
propertyChange
metadata tag:
.
propertyChange
takes no parameters,
for all public
metadata
[Bindable]
Metadata tags
51

Advertisement

Table of Contents
loading

Table of Contents