package
{
import flash.display.Sprite;
import mx.core.IFlexModuleFactory;
import mx.binding.ArrayElementWatcher;
import mx.binding.FunctionReturnWatcher;
import mx.binding.IWatcherSetupUtil;
import mx.binding.PropertyWatcher;
import mx.binding.RepeaterComponentWatcher;
import mx.binding.RepeaterItemWatcher;
import mx.binding.XMLWatcher;
import mx.binding.Watcher;
[ExcludeClass]
[Mixin]
public class _DataBinding2WatcherSetupUtil extends Sprite
implements mx.binding.IWatcherSetupUtil
{
public function _DataBinding2WatcherSetupUtil()
{
super();
}
public static function init(fbs:IFlexModuleFactory):void
{
import DataBinding2;
(DataBinding2).watcherSetupUtil = new _DataBinding2WatcherSetupUtil();
}
public function setup(target:Object,
propertyGetter:Function,
bindings:Array,
watchers:Array):void
{
import mx.core.DeferredInstanceFromFunction;
import flash.events.EventDispatcher;
import mx.containers.HBox;
import mx.utils.UIDUtil;
import mx.core.IDeferredInstance;
import mx.core.Application;
import mx.core.ClassFactory;
import mx.core.UIComponentDescriptor;
import mx.core.mx_internal;
import mx.events.PropertyChangeEvent;
import mx.controls.TextInput;
import flash.events.Event;
import mx.core.IFactory;
import mx.core.IPropertyChangeNotifier;
import mx.core.DeferredInstanceFromClass;
import mx.utils.ObjectProxy;
import mx.binding.BindingManager;
import mx.controls.Label;
import flash.events.IEventDispatcher;
var tempWatcher:mx.binding.Watcher;
watchers[1] = new mx.binding.PropertyWatcher("src",
{
propertyChange: true
}
);
watchers[2] = new mx.binding.PropertyWatcher("text",
{
textChanged: true,
change: false
}
);
watchers[6] = new mx.binding.PropertyWatcher("bool",
{
propertyChange: true
}
);
watchers[3] = new mx.binding.PropertyWatcher("dst",
{
propertyChange: true
}
);
watchers[4] = new mx.binding.PropertyWatcher("text",
{
textChanged: true,
change: false
}
);
tempWatcher = watchers[1];
tempWatcher.addListener(bindings[2]);
tempWatcher.addListener(bindings[3]);
tempWatcher.addListener(bindings[0]);
watchers[1].propertyGetter = propertyGetter;
watchers[1].updateParent(target);
tempWatcher = watchers[2];
tempWatcher.addListener(bindings[2]);
tempWatcher.addListener(bindings[3]);
tempWatcher.addListener(bindings[0]);
watchers[1].addChild(watchers[2]);
watchers[6].addListener(bindings[3]);
watchers[6].propertyGetter = propertyGetter;
watchers[6].updateParent(target);
watchers[3].addListener(bindings[1]);
watchers[3].propertyGetter = propertyGetter;
watchers[3].updateParent(target);
watchers[4].addListener(bindings[1]);
watchers[3].addChild(watchers[4]);
bindings[0].uiComponentWatcher = 1;
bindings[0].execute();
bindings[1].uiComponentWatcher = 3;
bindings[1].execute();
bindings[2].uiComponentWatcher = 1;
bindings[2].execute();
bindings[3].uiComponentWatcher = 1;
bindings[3].execute();
}
}
}