`
hyj0903
  • 浏览: 148488 次
  • 性别: Icon_minigender_1
  • 来自: 湖南
社区版块
存档分类
最新评论

flex4数据邦定(Binding)

 
阅读更多

eg1:

<s:TextInput id="text1" text="someboy"/>

<s:Label id="lbl1" text="{text1.text}"/>


eg2:

<s:TextInput id="text1" text="@{text2.text}"/>

<s:TextInput id="text2" />



eg3:

<fx:Script>
<![CDATA[
[Bindable]//此句不能少
private var text3Str:String="fdfdfd";
]]>
</fx:Script>

<s:TextInput id="text3"  text="{text3Str}"/>



eg4:


<fx:Script>
<![CDATA[
[Bindable]
private var str:String="fdfdfd";
]]>
</fx:Script>

<fx:Binding source="text1.text" destination="str"/>

<s:TextInput id="text2" />

以上都可以实现邦定功能,版本为flex4。
0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics