Flex Metadata tags

http://livedocs.adobe.com/flex/3/html/help.html?content=metadata_3.html

MetaData 标签:Metadata tags provide information to the Flex compiler that describes how your components are used in a Flex application.

ArrayElementType

[ArrayElementType]

语法:[ArrayElementType("Type")]

参数 Type:申明一个指定数据类型的数组变量。数据类型可以是 String, Number, class, or interface.如果是自定的数据类型,需要指定完整的包名及类名。

示例:[ArrayElementType("String")] public var ary:Array;

Bindable

如果属性的数据源是一个数据绑定表达式,当这个源属性的值发生改变时,Flex会自动拷贝源属性的值到任何目标属性.信号到Flex进行执行复制,你必须用[Bindable]元数据标签与Flex的属性进行注册,并且源属性值发生变化时必段派发一个事件.

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 [Bindable] metadata tag to register the property with Flex, and the source property must dispatch an event.

语法: 

变量绑定:[Bindable]  private var strValue:String;

事件绑定:[Bindable(event="eventname")]


使用可绑定的属性链

当你指定一个属性做为数据绑定的源,Flex不仅监控属性的改变,也监控“chain of properties leading up to it”,整个链的属性,包括目标属性,称为一个可绑定的属性链,在下面的例子中,firstName.txt是一个可绑定的属性链,包括firstName对象和它的text属性。

<first>{firstName.text}</first>

DefaultProperty

The [DefaultProperty] metadata tag defines the name of the default property of the component when you use the component in an MXML file.

The [DefaultProperty] metadata tag has the following syntax:

[DefaultProperty("propertyName")]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值