Pay for Hesitation: Flex metadata tags

Pages

2008年3月18日 星期二

Flex metadata tags

You insert metadata tags into your MXML and ActionScript files to provide information to the Flex compiler. Metadata tags do not get compiled into executable code, but provide information to control how portions of your code get compiled.

官方公開的metadata tags

[ArrayElementType]
Defines the allowed data type of each element of an Array. For more information, see ArrayElementType metadata tag.


[Bindable]
Identifies a property that you can use as the source of a data binding expression. For more information, see Bindable metadata tag.


[DefaultProperty]
Defines the name of the default property of the component when you use the component in an MXML file. For more information, see DefaultProperty metadata tag.


[Effect]
Defines the MXML property name for the effect. For more information, see Effect metadata tag.


[Embed]
Imports JPEG, GIF, PNG, SVG, and SWF files at compile time. Also imports image assets from SWC files. This is functionally equivalent to the MXML @Embed syntax, as described in Embedding Assets in Flex 2 Developer's Guide.


[Event]
Defines the MXML property for an event and the data type of the event object that a component emits. For more information, see Event metadata tag.


[IconFile]
Identifies the filename for the icon that represents the component in the Insert bar of Adobe® Flex™ Builder™. For more information, see IconFile metadata tag.


[Inspectable]
Defines an attribute exposed to component users in the attribute hints and Tag inspector of Flex Builder. Also limits allowable values of the property. For more information, see Inspectable metadata tag.


[InstanceType]
Specifies the allowed data type of a property of type IDeferredInstance. For more information, see InstanceType metadata tag.


[NonCommittingChangeEvent]
Identifies an event as an interim trigger. For more information, see NonCommittingChangeEvent metadata tag.


[Style]
Defines the MXML property for a style property for the component. For more information on using the [Style] metadata tag, see Style metadata tag.




下面是官方文件沒記載的,由此站挖到的..

[SWF]
[SWF(width="300", height="200", frameRate="18", backgroundColor="#FFFFFF")]


[RemoteClass]
[RemoteClass(alias="flex.messaging.io.ArrayCollection")]
[RemoteClass(alias="flex.messaging.io.ArrayList")]



[Frame]
[Frame(factoryClass="mx.managers.SystemManager")]
[Frame(factoryClass="mx.core.FlexApplicationBootstrap")]

[Frame(extraClass="Obj")]


[ExcludeClass]


[DefaultBindingProperty]
[DefaultBindingProperty(destination="dataProvider")]


[DefaultTriggerEvent]
[DefaultTriggerEvent("itemClick")]
[DefaultTriggerEvent("scroll")]


[Exclude]
[Exclude(name="defaultButton", kind="property")]
[Exclude(name="horizontalScrollPolicy", kind="property")]
[Exclude(name="icon", kind="property")]
[Exclude(name="label", kind="property")]
[Exclude(name="tileHeight", kind="property")]


[ResourceBundle]
[ResourceBundle("validators")]
[ResourceBundle("SharedResources")]
[ResourceBundle("foo")]


[PercentProxy]
[PercentProxy("percentHeight")]


[RequiresDataBinding]
[RequiresDataBinding(true)]


[CollapseWhiteSpace]


[MaxChildren]
[MaxChildren(0)]


[AccessibilityClass]
[AccessibilityClass(implementation="mx.accessibility.PanelAccImpl")]
[AccessibilityClass(implementation="mx.accessibility.TitleWindowAccImpl")]
[Transient]



reference:

Creating own meta data in Flex

看看[Bindalbe]幕後做了什麼事

metatags的使用範例

沒有留言: