iamzealotwang 发表于 2013-2-7 22:26:57

Flex DataBinding(3)

Defining binding watchers
 
Flex includes the mx.binding.utils.ChangeWatcher class that you can use to define a data-binding watcher. Typically,
a data-binding watcher invokes an event listener when a binding occurs. To set up a data-binding watcher, you use the
static watch() method of the ChangeWatcher class.
 
做了一下实验,用以检测整体数据绑定流程
整体类结构如下:
http://dl.iteye.com/upload/attachment/145067/6aea60f0-eca4-3c48-bdcb-53f9961ec0ca.png 
 
在舞台上挂载两个Panel板,建立一个ClassA并挂载到Panel2上面,ClassB为单例。
由Database对一些DataFile进行引用,并且将其中一个DataFile进行数据绑定(其余所有对象).
 
代码如下:
 
Stage

<span style="font-size: small; color: #0000ff;"><div style="background-color: #1e1e27;"><div style="background: #fdfdfd; color: black;">MXML语言:
页: [1]
查看完整版本: Flex DataBinding(3)