隨筆-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>

          主站蜘蛛池模板: 叙永县| 宣化县| 皋兰县| 建阳市| 富裕县| 宜宾市| 车致| 凤山县| 藁城市| 乡宁县| 牙克石市| 苏州市| 云和县| 泰安市| 仁化县| 安乡县| 醴陵市| 襄城县| 宁国市| 万全县| 井研县| 孟津县| 涞源县| 垫江县| 黎川县| 临漳县| 三原县| 菏泽市| 左云县| 民权县| 玉门市| 射洪县| 二连浩特市| 松原市| 新田县| 康马县| 明星| 闽清县| 休宁县| 渑池县| 淮安市|