隨筆-75  評論-193  文章-5  trackbacks-0
          P988

          Binding data with the <mx:Binding> tag

          該章節和Binding data with curly braces基本一樣,講了如下幾個方面的內容:
          1、Using ActionScript expressions in Binding tags
          ??????在BindingTags中使用ActionScript表達式
          2、Binding more than one source property to a destination property
          ??????將多個源屬性綁定到一個目的屬性上
          3、Binding a source property to more than one destination property
          ??????將一個源屬性綁定到多個目的屬性上
          4、Using an E4X expression in an <mx:Binding> tag
          ??????在<mx:Binding>標簽中使用E4X表達式

          上述四種情況在文中都有例子,仔細看一下,理解起來應該沒有問題。

          第三種情況中的例子應該修改為如下,才可以正確運行,在文中的例子中沒有<mx:Binding>的相關配置。
          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx="?<mx:TextInput id="input1" text="Hello" />
          ?<mx:Model id="mod1">
          ??<part>{input1.text}</part>
          ?</mx:Model>
          ?<mx:Model id="mod2">
          ??<part>{input1.text}</part>
          ?</mx:Model>
          ?<mx:Label id="label1" x="10" y="30" text="{mod1.part}"/>
          ?<mx:Label id="label2" x="10" y="60" text="{mod2.part}"/>
          ?
          ?<mx:Binding source="input1.text" destination="mod1.part"/>
          ?<mx:Binding source="input1.text" destination="mod2.part"/>
          ?<mx:Binding source="mod1.part" destination="label1.text"/>
          ?<mx:Binding source="mod2.part" destination="label2.text"/>
          </mx:Application>

          主站蜘蛛池模板: 茌平县| 绥棱县| 蓝山县| 塔河县| 仪征市| 天峻县| 安阳县| 横山县| 万荣县| 随州市| 长顺县| 略阳县| 池州市| 友谊县| 庆元县| 广德县| 文水县| 略阳县| 万宁市| 潜江市| 全椒县| 宁蒗| 南岸区| 湘阴县| 互助| 平昌县| 太湖县| 个旧市| 苏尼特右旗| 广昌县| 包头市| 理塘县| 西乌珠穆沁旗| 北京市| 太和县| 京山县| 长寿区| 雅安市| 申扎县| 城固县| 芒康县|