|
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.
做了一下实验,用以检测整体数据绑定流程
整体类结构如下:
在舞台上挂载两个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语言: |
|