我也提出问题

保留原著,并且问题被回答或审核通过时通知你:


Tag Archives: 双向绑定

Flex不支持双向绑定的情况

以下这些都不支持双向绑定:

Style properties
Effect properties
The request property of the HttpService, RemoteObject, and WebService classes.
The arguments property of the RemoteObject class.

- 作者:SWFAQ | http://swfaq.org

Flex里实现双向绑定的三种方法

1.
<mx:TextInput id=”input1″ text=”{input2.text}”/>
<mx:TextInput id=”input2″ text=”{input1.text}”/>
2.
<mx:TextInput id=”input1″ text=”@{input2.text}”/>
<mx:TextInput id=”input2″/>
3.
<fx:Binding source=”input1.text” destination=”input2.text” twoWay=”true/>
注意:
被绑定的属性不能包含表达式,原因:Because both the source and the destination properties must resolve to a bindable property or property chain at compile time, neither property value can include a binding expression. 否则会出现错误:1105: 赋值的目标必须是引用值。
双向绑定不会出现死循环:Flex ensures that bidirectional data bindings do not result in an infinite loop; that is, Flex [...]