User Guide
Metadata tags 61
You insert the [NonCommittingChangeEvent] metadata tag before an ActionScript property
definition or before a setter or getter method. The
[NonCommittingChangeEvent] metadata
tag has the following syntax:
[NonCommittingChangeEvent("event_name")]
In the following example, the component dispatches the change event every time the user
enters a keystroke, but the
change event does not trigger data binding or data validators.
When the user completes data entry, by pressing the Enter key, the component broadcasts the
valueCommit event to trigger any data bindings and data validators:
[Event(name="change", type="flash.events.Event")]
class MyText extends UIComponent {
...
[Bindable(event="valueCommit")]
[NonCommittingChangeEvent("change")]
function get text():String {
return getText();
}
function set text(t):void {
setText(t);
// Dispatch events.
}
}
Style metadata tag
Use the [Style] metadata tag to define the MXML tag attribute for a style property for the
component. You insert the
[Style] metadata tag before the class definition in an
ActionScript file, or in the
<mx:Metadata> block in an MXML file.
The
[Style] metadata tag has the following syntax:
[Style(name="style_name"[,property="value",...])]
The following table describes the properties for the [Style] metadata tag:
Option Type Description
name
String (Required) Specifies the name of the style.
type
String Specifies the data type of the value that you write to the style
property. If the type is not an ActionScript type such as Number or
Date, use a qualified class name in the form
packageName.className.