??xml version="1.0" encoding="utf-8" standalone="yes"?>97se亚洲,国产在线精品一区二区中文,久久免费看少妇高潮http://www.aygfsteel.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.aygfsteel.com/robbie/articles/79280.html三十而立三十而立Sun, 05 Nov 2006 15:14:00 GMThttp://www.aygfsteel.com/robbie/articles/79280.htmlhttp://www.aygfsteel.com/robbie/comments/79280.htmlhttp://www.aygfsteel.com/robbie/articles/79280.html#Feedback0http://www.aygfsteel.com/robbie/comments/commentRss/79280.htmlhttp://www.aygfsteel.com/robbie/services/trackbacks/79280.html
Binding data with the <mx:Binding> tag

该章节和Binding data with curly braces基本一P讲了如下几个斚w的内容:
1、Using ActionScript expressions in Binding tags
      在BindingTags中用ActionScript表达?br />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
      ?lt;mx:Binding>标签中用E4X表达?br />
上述四种情况在文中都有例子,仔细看一下,理解h应该没有问题?br />
W三U情况中的例子应该修改ؓ如下Q才可以正确q行Q在文中的例子中没有<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>



三十而立 2006-11-05 23:14 发表评论
]]>
Flex2 develop guide study - 4 - data binding http://www.aygfsteel.com/robbie/articles/78812.html三十而立三十而立Thu, 02 Nov 2006 16:19:00 GMThttp://www.aygfsteel.com/robbie/articles/78812.htmlhttp://www.aygfsteel.com/robbie/comments/78812.htmlhttp://www.aygfsteel.com/robbie/articles/78812.html#Feedback0http://www.aygfsteel.com/robbie/comments/commentRss/78812.htmlhttp://www.aygfsteel.com/robbie/services/trackbacks/78812.htmlP986

Using ActionScript expressions in curly braces
在{}中用ActionScript表达?br />
Using an E4X expression in curly braces
在{}中用E4X表达?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.
当绑定的属性是XMLcdӞ在{}中的l定表达式或者在<mx:Binding>标签中可以包含一个ECMAScript for XML的表辑ּ?br />
当用E4X表达式时Q必dXML熟悉?/font>

P987늚例子应该试一下,看看当xml中有两个descriptionӞ其输出结果会如何Q?br />当有两个descriptionӞ会P代将description输出Q不q需要注意的是输出结果格式如下:
   <description>Big Screen Television</description>
   <description>DVD Player</description>

Using ActionScript functions in curly braces
在{}中用ActionScript函数

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属性没有作为参数进行传递,而是在函数内部被引用了,当inString属性发生变化时Q函数是不会被调用的?br />
以上三种情况的例子在文中有详细的描qͼ׃在这里脓Z?br />
最q忙于项目上U,只能每天看一点了Q(



三十而立 2006-11-03 00:19 发表评论
]]>
Flex2 develop guide study - 3 - data bindinghttp://www.aygfsteel.com/robbie/articles/78570.html三十而立三十而立Wed, 01 Nov 2006 15:06:00 GMThttp://www.aygfsteel.com/robbie/articles/78570.htmlhttp://www.aygfsteel.com/robbie/comments/78570.htmlhttp://www.aygfsteel.com/robbie/articles/78570.html#Feedback0http://www.aygfsteel.com/robbie/comments/commentRss/78570.htmlhttp://www.aygfsteel.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.

数据l定需要一个源Q一个目标和需要从源拷贝数据到目的一个触发事件?br />
注意Q这句话解释了数据绑定的本质。也引出了下面的一D话?/font>

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
“Bindable metadata tag?in Creating and Extending Flex 2 Components.

上面q段话的关键含义在于有下划线的这一D? 控g必须支持数据l定Q这意味着当属性改变时控g必须发送一个事件来触发数据l定的操作?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.

对于实行Q可以用ActionScript的函数做为绑定表辑ּ的源。通常可以使用一个绑定的属性做为函数的参数Q这样当属性变化时Q函数将会执行,l果׃被绑定的目的使用?br />
注:对上面一D话有了初步的理解,不过最好能有一个例子说明,可惜q没看到:(

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.

注:q也是一个说明函C数据l定相关的用方法?br />下面l于p讲到数据l定的具体用方法了?br />
Binding data with curly braces

举例如下Q?br /><?xml version="1.0"?>
<mx:Application xmlns:mx="<!-- Data model stores registration data that user enters. -->
<mx:Model id="reg">
   <registration>
      <name>{name.text}</name>
      <email>{email.text}</email>
      <phone>{phone.text}</phone>
      <zip>{zip.text}</zip>
      <ssn>{ssn.text}</ssn>
   </registration>
</mx:Model>
<!-- Form contains user input controls. -->
<mx:Form>
   <mx:FormItem label="Name" required="true">
      <mx:TextInput id="name" width="200"/>
   </mx:FormItem>
   <mx:FormItem label="Email" required="true">
      <mx:TextInput id="email" width="200"/>
   </mx:FormItem>
   <mx:FormItem label="Phone" required="true">
      <mx:TextInput id="phone" width="200"/>
   </mx:FormItem>
   <mx:FormItem label="Zip" required="true">
      <mx:TextInput id="zip" width="60"/>
   </mx:FormItem>
   <mx:FormItem label="Social Security" required="true">
      <mx:TextInput id="ssn" width="200"/>
   </mx:FormItem>
   ...
</mx:Form>
</mx:Application>

上面的例子很清楚的说明了使用{}做ؓ数据l定的用法。不q在上面的例子中使用CDataModelQ关于Data Models请参见 Chapter 38, “Storing Data,?on page 1001?/font>

三十而立 2006-11-01 23:06 发表评论
]]>
Flex2 develop guide study - 2http://www.aygfsteel.com/robbie/articles/78249.html三十而立三十而立Tue, 31 Oct 2006 04:52:00 GMThttp://www.aygfsteel.com/robbie/articles/78249.htmlhttp://www.aygfsteel.com/robbie/comments/78249.htmlhttp://www.aygfsteel.com/robbie/articles/78249.html#Feedback0http://www.aygfsteel.com/robbie/comments/commentRss/78249.htmlhttp://www.aygfsteel.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.

数据l定提供了一U便利的Ҏ在程序中传递数据,它可以在一个对象和另一个对象间建立兌关系。在Flex2中提供了三种特定的方法用于数据绑定:
1、{}
2?lt;mx:Binding>标签
3、ActionScript中的BindingUtilsҎ

Common uses of data binding include the following:
通常使用数据l定的情形如下:
?To bind properties of user interface controls to data service requests.
用户交互界面中的输入绑定到数据服务h中?br />?To bind data service results to properties of user interface controls.
数据服务响应的l果l定到用户交互界面中?br />?To bind data service results to a middle-tier data model, and to bind that data model’s
fields to user interface controls. For more information about data models, see Chapter 38,
“Storing Data,?on page 1001.
数据服务响应结果绑定到处于中间层的数据模型中,再将数据模型的字D늻定到用户交互界面中?br />?To bind properties of user interface controls to a middle-tier data model, and to bind that
data model’s fields bound to a data service request (a three-tier system).
984 Binding Data
用户交互界面中的输入绑定到处于中间层的数据模型中,再将数据模型的字D늻定到数据服务h中?br />?To bind an ArrayCollection or XMLListCollection object to the dataProvider property
of a List-based control.
ArrayCollection或者XMLListCollection对象l定到基于List的界面控件的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.
复杂属性的单个部分l定到用户交互界面中?br />?To bind XML data to user interface controls by using ECMAScript for XML (E4X)
expressions in binding expressions.
通过使用ECMAScript for XML表达式将XML数据l定到用户交互界面中?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.

管数据l定是一个强大的机制Q但是其q不适用于所有状c比如在如下两种情况中就不适合使用数据l定Q?br />1、在一个复杂的用户交互界面中,一些更新有严格的时间次序?br />2、由于数据绑定在属性每ơ发生改变时都会触发Q仅仅希望在一些特定的条g下触发改变时׃适合使用数据l定?br />




三十而立 2006-10-31 12:52 发表评论
]]>
Flex2 develop guide study - 1http://www.aygfsteel.com/robbie/articles/78176.html三十而立三十而立Mon, 30 Oct 2006 15:26:00 GMThttp://www.aygfsteel.com/robbie/articles/78176.htmlhttp://www.aygfsteel.com/robbie/comments/78176.htmlhttp://www.aygfsteel.com/robbie/articles/78176.html#Feedback0http://www.aygfsteel.com/robbie/comments/commentRss/78176.htmlhttp://www.aygfsteel.com/robbie/services/trackbacks/78176.html P980
Representing Data

RepresentingData.JPG
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.

数据l定Ҏ可以在q行时自动将一个客L对象的属性复制到另一个客L对象的属性。数据绑定通常当一个原对象的属性改变时被触发。你可以使用数据l定用戯入数据传递至数据服务端。你也可以用数据绑定将数据服务端的q回g递至用户交互界面?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.

数据模型Ҏ可以将数据存储于客LQ一个数据模型是一个ActionScript对象Q这个对象的属性与要存储的数据对应Q这个对象也可能包含一些其它方法。数据模型对于将E序中的用户交互界面与数据分非常有效?br />
Data validation
The data validation feature lets you ensure that data meets specific criteria before the
application uses the data.

数据校验Ҏ得程序在使用数据前,保数据W合一定的标准?br />
Data formatting
The data formatting feature lets you change the format of data before displaying it in a user
interface control.

数据格式Ҏ得在数据显CZ用户交互界面前可以改变数据的昄格式?/p>

三十而立 2006-10-30 23:26 发表评论
]]>
վ֩ģ壺 Ȫ| | | ٽ| ƽ| | | ʩ| ɽ| ƽ| | ɽ| | | | | | | | ֱ| | | | º| | | Ԫ| Ϫ| Ͽ| | ɽ| | ʱ| ٹ| ɽ| °Ͷ| ˻| | ƽ| ̶| |