home *** CD-ROM | disk | FTP | other *** search
- package
- {
- import com.flex.ErrorAlert;
- import flash.display.Sprite;
- import mx.binding.FunctionReturnWatcher;
- import mx.binding.IWatcherSetupUtil;
- import mx.binding.PropertyWatcher;
- import mx.binding.StaticPropertyWatcher;
- import mx.core.Application;
- import mx.core.IFlexModuleFactory;
-
- public class _com_flex_ErrorAlertWatcherSetupUtil extends Sprite implements IWatcherSetupUtil
- {
- public function _com_flex_ErrorAlertWatcherSetupUtil()
- {
- super();
- }
-
- public static function init(param1:IFlexModuleFactory) : void
- {
- ErrorAlert.watcherSetupUtil = new _com_flex_ErrorAlertWatcherSetupUtil();
- }
-
- public function setup(param1:Object, param2:Function, param3:Array, param4:Array) : void
- {
- var target:Object = param1;
- var propertyGetter:Function = param2;
- var bindings:Array = param3;
- var watchers:Array = param4;
- watchers[2] = new StaticPropertyWatcher("application",null,[bindings[1]],null);
- watchers[3] = new PropertyWatcher("currentErrorMsg",null,[bindings[1]],null);
- watchers[0] = new PropertyWatcher("resourceManager",{"unused":true},[bindings[2],bindings[0]],propertyGetter);
- watchers[4] = new FunctionReturnWatcher("getString",target,function():Array
- {
- return ["alerts","CLOSE"];
- },{"change":true},[bindings[2]],null);
- watchers[1] = new FunctionReturnWatcher("getString",target,function():Array
- {
- return ["alerts","THERE_WAS_A_PROBLEM"];
- },{"change":true},[bindings[0]],null);
- watchers[2].updateParent(Application);
- watchers[2].addChild(watchers[3]);
- watchers[0].updateParent(target);
- watchers[4].parentWatcher = watchers[0];
- watchers[0].addChild(watchers[4]);
- watchers[1].parentWatcher = watchers[0];
- watchers[0].addChild(watchers[1]);
- }
- }
- }
-
-