锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产综合无码一区二区二三区,亚洲综合av一区二区三区,亚洲欧洲日产v特级毛片http://www.tkk7.com/robbie/category/16728.htmlzh-cnTue, 27 Feb 2007 10:03:38 GMTTue, 27 Feb 2007 10:03:38 GMT60Flex2 develop guide study - 5 - data binding http://www.tkk7.com/robbie/articles/79280.html涓夊崄鑰岀珛涓夊崄鑰岀珛Sun, 05 Nov 2006 15:14:00 GMThttp://www.tkk7.com/robbie/articles/79280.htmlhttp://www.tkk7.com/robbie/comments/79280.htmlhttp://www.tkk7.com/robbie/articles/79280.html#Feedback0http://www.tkk7.com/robbie/comments/commentRss/79280.htmlhttp://www.tkk7.com/robbie/services/trackbacks/79280.html Binding data with the <mx:Binding> tag
璇ョ珷鑺傚拰Binding data with curly braces鍩烘湰涓鏍鳳紝璁蹭簡濡備笅鍑犱釜鏂歸潰鐨勫唴瀹癸細 1銆乁sing ActionScript expressions in Binding tags 聽聽聽聽聽聽鍦˙indingTags涓嬌鐢ˋctionScript琛ㄨ揪寮?br />2銆丅inding more than one source property to a destination property 聽聽聽聽聽聽灝嗗涓簮灞炴х粦瀹氬埌涓涓洰鐨勫睘鎬т笂 3銆丅inding a source property to more than one destination property 聽聽聽聽聽聽灝嗕竴涓簮灞炴х粦瀹氬埌澶氫釜鐩殑灞炴т笂 4銆乁sing an E4X expression in an <mx:Binding> tag 聽聽聽聽聽聽鍦?lt;mx:Binding>鏍囩涓嬌鐢‥4X琛ㄨ揪寮?br /> 涓婅堪鍥涚鎯呭喌鍦ㄦ枃涓兘鏈変緥瀛愶紝浠旂粏鐪嬩竴涓嬶紝鐞嗚В璧鋒潵搴旇娌℃湁闂銆?br /> 絎笁縐嶆儏鍐典腑鐨勪緥瀛愬簲璇ヤ慨鏀逛負濡備笅錛屾墠鍙互姝g‘榪愯錛屽湪鏂囦腑鐨勪緥瀛愪腑娌℃湁<mx:Binding>鐨勭浉鍏抽厤緗?br /><?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>
]]>Flex2 develop guide study - 4 - data binding http://www.tkk7.com/robbie/articles/78812.html涓夊崄鑰岀珛涓夊崄鑰岀珛Thu, 02 Nov 2006 16:19:00 GMThttp://www.tkk7.com/robbie/articles/78812.htmlhttp://www.tkk7.com/robbie/comments/78812.htmlhttp://www.tkk7.com/robbie/articles/78812.html#Feedback0http://www.tkk7.com/robbie/comments/commentRss/78812.htmlhttp://www.tkk7.com/robbie/services/trackbacks/78812.htmlP986
Using ActionScript expressions in curly braces 鍦▄}涓嬌鐢ˋctionScript琛ㄨ揪寮?br /> Using an E4X expression in curly braces 鍦▄}涓嬌鐢‥4X琛ㄨ揪寮?br /> A binding expression in curly braces or an <mx:Binding> tag can contain an ECMAScript for XML (E4X) expression when the source of a binding is a bindable property of type XML. 褰撶粦瀹氱殑灞炴ф槸XML綾誨瀷鏃訛紝鍦▄}涓殑緇戝畾琛ㄨ揪寮忔垨鑰呭湪<mx:Binding>鏍囩涓彲浠ュ寘鍚竴涓狤CMAScript for XML鐨勮〃杈懼紡銆?br /> 褰撲嬌鐢‥4X琛ㄨ揪寮忔椂錛屽繀欏誨XML鐔熸倝銆?/font>
Using ActionScript functions in curly braces 鍦▄}涓嬌鐢ˋctionScript鍑芥暟
If the inString property is not passed as an argument, but is referenced from within the function, the function does not get invoked when the inString property changes. 濡傛灉inString灞炴ф病鏈変綔涓哄弬鏁拌繘琛屼紶閫掞紝鑰屾槸鍦ㄥ嚱鏁板唴閮ㄨ寮曠敤浜嗭紝褰搃nString灞炴у彂鐢熷彉鍖栨椂錛屽嚱鏁版槸涓嶄細琚皟鐢ㄧ殑銆?br /> 浠ヤ笂涓夌鎯呭喌鐨勪緥瀛愬湪鏂囨。涓湁璇︾粏鐨勬弿榪幫紝灝變笉鍦ㄨ繖閲岃創鍑轟簡銆?br /> 鏈榪戝繖浜庨」鐩笂綰匡紝鍙兘姣忓ぉ灝戠湅涓鐐逛簡錛氾紙
]]>Flex2 develop guide study - 3 - data bindinghttp://www.tkk7.com/robbie/articles/78570.html涓夊崄鑰岀珛涓夊崄鑰岀珛Wed, 01 Nov 2006 15:06:00 GMThttp://www.tkk7.com/robbie/articles/78570.htmlhttp://www.tkk7.com/robbie/comments/78570.htmlhttp://www.tkk7.com/robbie/articles/78570.html#Feedback0http://www.tkk7.com/robbie/comments/commentRss/78570.htmlhttp://www.tkk7.com/robbie/services/trackbacks/78570.htmlData binding requires a source property, a destination property, and a triggering event that indicates when to copy the data from the source to the destination.
You can use all properties of a component as the destination of a data binding expression. However, to use a property as the source of a data binding expression,the component must be implemented to support data binding, which means that the component dispatches an event when the value of the property changes to trigger the binding. For more information on creating component properties that can be used as the source of a data binding expression, see 鈥淏indable metadata tag鈥?in Creating and Extending Flex 2 Components.
涓婇潰榪欐璇濈殑鍏抽敭鍚箟鍦ㄤ簬鏈変笅鍒掔嚎鐨勮繖涓孌? 鎺т歡蹇呴』鏀寔鏁版嵁緇戝畾錛岃繖鎰忓懗鐫褰撳睘鎬ф敼鍙樻椂鎺т歡蹇呴』鍙戦佷竴涓簨浠舵潵瑙﹀彂鏁版嵁緇戝畾鐨勬搷浣溿?br /> In addition to properties, you can use ActionScript functions as the source of binding expressions. You usually do this when using a bindable property as an argument of a function. When the property changes, the function executes, and the result is used in the binding destination.
You can also use a property of type Function as a binding source or destination. A property of type Function is a variable that holds a reference to a function.
娉細榪欎篃鏄竴涓鏄庡嚱鏁頒笌鏁版嵁緇戝畾鐩稿叧鐨勪嬌鐢ㄦ柟娉曘?br />涓嬮潰緇堜簬灝辮璁插埌鏁版嵁緇戝畾鐨勫叿浣撲嬌鐢ㄦ柟娉曚簡銆?br /> Binding data with curly braces
]]>Flex2 develop guide study - 2http://www.tkk7.com/robbie/articles/78249.html涓夊崄鑰岀珛涓夊崄鑰岀珛Tue, 31 Oct 2006 04:52:00 GMThttp://www.tkk7.com/robbie/articles/78249.htmlhttp://www.tkk7.com/robbie/comments/78249.htmlhttp://www.tkk7.com/robbie/articles/78249.html#Feedback0http://www.tkk7.com/robbie/comments/commentRss/78249.htmlhttp://www.tkk7.com/robbie/services/trackbacks/78249.htmlAbout data binding
Data binding is the process of tying the data in one object to another object. It provides a convenient way to pass data around in an application. Adobe Flex 2 provides three ways to specify data binding: the curly braces ({}) syntax and the <mx:Binding> tag in MXML and the BindingUtils methods in ActionScript.
Common uses of data binding include the following: 閫氬父浣跨敤鏁版嵁緇戝畾鐨勬儏褰㈠涓嬶細 鈻?To bind properties of user interface controls to data service requests. 灝嗙敤鎴蜂氦浜掔晫闈腑鐨勮緭鍏ョ粦瀹氬埌鏁版嵁鏈嶅姟璇鋒眰涓?br />鈻?To bind data service results to properties of user interface controls. 灝嗘暟鎹湇鍔″搷搴旂殑緇撴灉緇戝畾鍒扮敤鎴蜂氦浜掔晫闈腑銆?br />鈻?To bind data service results to a middle-tier data model, and to bind that data model鈥檚 fields to user interface controls. For more information about data models, see Chapter 38, 鈥淪toring Data,鈥?on page 1001. 灝嗘暟鎹湇鍔″搷搴旂粨鏋滅粦瀹氬埌澶勪簬涓棿灞傜殑鏁版嵁妯″瀷涓紝鍐嶅皢鏁版嵁妯″瀷鐨勫瓧孌電粦瀹氬埌鐢ㄦ埛浜や簰鐣岄潰涓?br />鈻?To bind properties of user interface controls to a middle-tier data model, and to bind that data model鈥檚 fields bound to a data service request (a three-tier system). 984 Binding Data 灝嗙敤鎴蜂氦浜掔晫闈腑鐨勮緭鍏ョ粦瀹氬埌澶勪簬涓棿灞傜殑鏁版嵁妯″瀷涓紝鍐嶅皢鏁版嵁妯″瀷鐨勫瓧孌電粦瀹氬埌鏁版嵁鏈嶅姟璇鋒眰涓?br />鈻?To bind an ArrayCollection or XMLListCollection object to the dataProvider property of a List-based control. 灝咥rrayCollection鎴栬匵MLListCollection瀵硅薄緇戝畾鍒板熀浜嶭ist鐨勭晫闈㈡帶浠剁殑dataProvider灞炴т腑銆?br />鈻?To bind individual parts of complex properties to properties of user interface controls. An example would be a master-detail scenario in which clicking an item in a List control displays data in several other controls. 灝嗗鏉傚睘鎬х殑鍗曚釜閮ㄥ垎緇戝畾鍒扮敤鎴蜂氦浜掔晫闈腑銆?br />鈻?To bind XML data to user interface controls by using ECMAScript for XML (E4X) expressions in binding expressions. 閫氳繃浣跨敤ECMAScript for XML琛ㄨ揪寮忓皢XML鏁版嵁緇戝畾鍒扮敤鎴蜂氦浜掔晫闈腑銆?br /> Although binding is a powerful mechanism, it is not appropriate for all situations. For example, for a complex user interface in which individual pieces must be updated based on strict timing, it would be preferable to use a method that assigns properties in order. Also, binding executes every time a property changes, so it is not the best solution when you want changes to be noticed only some of the time.
]]>Flex2 develop guide study - 1http://www.tkk7.com/robbie/articles/78176.html涓夊崄鑰岀珛涓夊崄鑰岀珛Mon, 30 Oct 2006 15:26:00 GMThttp://www.tkk7.com/robbie/articles/78176.htmlhttp://www.tkk7.com/robbie/comments/78176.htmlhttp://www.tkk7.com/robbie/articles/78176.html#Feedback0http://www.tkk7.com/robbie/comments/commentRss/78176.htmlhttp://www.tkk7.com/robbie/services/trackbacks/78176.htmlP980 Representing Data
Data binding The data binding feature provides a syntax for automatically copying the value of a property of one client-side object to a property of another object at run time. Data binding is usually triggered when the value of the source property changes. You can use data binding to pass user input data from user interface controls to a data service. You can also use data binding to pass results returned from a data service to user interface controls.
鏁版嵁緇戝畾鐗規у彲浠ュ湪榪愯鏃惰嚜鍔ㄥ皢涓涓鎴風瀵硅薄鐨勫睘鎬у鍒跺埌鍙︿竴涓鎴風瀵硅薄鐨勫睘鎬с傛暟鎹粦瀹氶氬父褰撲竴涓師瀵硅薄鐨勫睘鎬ф敼鍙樻椂琚Е鍙戙備綘鍙互浣跨敤鏁版嵁緇戝畾灝嗙敤鎴瘋緭鍏ユ暟鎹紶閫掕嚦鏁版嵁鏈嶅姟绔備綘涔熷彲浠ヤ嬌鐢ㄦ暟鎹粦瀹氬皢鏁版嵁鏈嶅姟绔殑榪斿洖鍊間紶閫掕嚦鐢ㄦ埛浜や簰鐣岄潰銆?br /> Data models The data model feature lets you store data in client-side objects. A data model is an ActionScript object that contains properties for storing data, and that optionally contains methods for additional functionality. Data models are useful for partitioning the user interface and data in an application.
鏁版嵁妯″瀷鐗規у彲浠ュ皢鏁版嵁瀛樺偍浜庡鎴風錛屼竴涓暟鎹ā鍨嬫槸涓涓狝ctionScript瀵硅薄錛岃繖涓璞$殑灞炴т笌瑕佸瓨鍌ㄧ殑鏁版嵁瀵瑰簲錛岃繖涓璞′篃鍙兘鍖呭惈涓浜涘叾瀹冩柟娉曘傛暟鎹ā鍨嬪浜庡皢紼嬪簭涓殑鐢ㄦ埛浜や簰鐣岄潰涓庢暟鎹垎紱婚潪甯告湁鏁堛?br /> Data validation The data validation feature lets you ensure that data meets specific criteria before the application uses the data.
鏁版嵁鏍¢獙鐗規т嬌寰楃▼搴忓湪浣跨敤鏁版嵁鍓嶏紝紜繚鏁版嵁絎﹀悎涓瀹氱殑鏍囧噯銆?br /> Data formatting The data formatting feature lets you change the format of data before displaying it in a user interface control.