Added configureBridge().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5336 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -89,6 +89,19 @@ public class CommandEvent extends Event
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure a bridge from something like a pop-up window to an alternate target.
|
||||
*/
|
||||
public static function configureBridge (source :IEventDispatcher, target :IEventDispatcher) :void
|
||||
{
|
||||
source.addEventListener(COMMAND,
|
||||
function (event :CommandEvent) :void {
|
||||
event.markAsHandled();
|
||||
dispatch(target, event.command, event.arg);
|
||||
},
|
||||
false, -1);
|
||||
}
|
||||
|
||||
/** The command. */
|
||||
public var command :String;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user