| Package | com.threerings.util |
| Class | public class EventHandlerManager |
| Property | Defined by | ||
|---|---|---|---|
| _eventHandlers : Array | EventHandlerManager | ||
| Method | Defined by | ||
|---|---|---|---|
|
callWhenTrue(callback:Function, callNow:Boolean, dispatcher:IEventDispatcher, event:String, useCapture:Boolean = false, priority:int = 0):void
Will either call a given function now, or defer it based on the boolean parameter.
| EventHandlerManager | ||
|
freeAllHandlers(... ignored):void
Free all handlers that have been added via this registerListener() and have not been
freed already via unregisterListener()
| EventHandlerManager | ||
|
freeAllOn(dispatcher:IEventDispatcher):void
| EventHandlerManager | ||
|
registerListener(dispatcher:IEventDispatcher, event:String, listener:Function, useCapture:Boolean = false, priority:int = 0):void
Adds the specified listener to the specified dispatcher for the specified event.
| EventHandlerManager | ||
|
registerOneShotCallback(dispatcher:IEventDispatcher, event:String, callback:Function, useCapture:Boolean = false, priority:int = 0):void
Registers a zero-arg callback function that should be called once when the event fires.
| EventHandlerManager | ||
|
registerUnload(dispatcher:IEventDispatcher):void
Registers the freeAllHandlers() method to be called upon Event.UNLOAD on the supplied
event dispatcher.
| EventHandlerManager | ||
|
unregisterListener(dispatcher:IEventDispatcher, event:String, listener:Function, useCapture:Boolean = false):void
Removes the specified listener from the specified dispatcher for the specified event.
| EventHandlerManager | ||
| _eventHandlers | property |
protected var _eventHandlers:Array
| callWhenTrue | () | method |
public function callWhenTrue(callback:Function, callNow:Boolean, dispatcher:IEventDispatcher, event:String, useCapture:Boolean = false, priority:int = 0):voidWill either call a given function now, or defer it based on the boolean parameter. If the parameter is false, the function will be registered as a one-shot callback on the dispatcher
Parameterscallback:Function |
|
callNow:Boolean |
|
dispatcher:IEventDispatcher |
|
event:String |
|
useCapture:Boolean (default = false) |
|
priority:int (default = 0) |
| freeAllHandlers | () | method |
public function freeAllHandlers(... ignored):voidFree all handlers that have been added via this registerListener() and have not been freed already via unregisterListener()
Parameters... ignored |
| freeAllOn | () | method |
public function freeAllOn(dispatcher:IEventDispatcher):voidParameters
dispatcher:IEventDispatcher |
| registerListener | () | method |
public function registerListener(dispatcher:IEventDispatcher, event:String, listener:Function, useCapture:Boolean = false, priority:int = 0):voidAdds the specified listener to the specified dispatcher for the specified event.
Parametersdispatcher:IEventDispatcher |
|
event:String |
|
listener:Function |
|
useCapture:Boolean (default = false) |
|
priority:int (default = 0) |
| registerOneShotCallback | () | method |
public function registerOneShotCallback(dispatcher:IEventDispatcher, event:String, callback:Function, useCapture:Boolean = false, priority:int = 0):voidRegisters a zero-arg callback function that should be called once when the event fires.
Parametersdispatcher:IEventDispatcher |
|
event:String |
|
callback:Function |
|
useCapture:Boolean (default = false) |
|
priority:int (default = 0) |
| registerUnload | () | method |
public function registerUnload(dispatcher:IEventDispatcher):voidRegisters the freeAllHandlers() method to be called upon Event.UNLOAD on the supplied event dispatcher.
Parametersdispatcher:IEventDispatcher |
| unregisterListener | () | method |
public function unregisterListener(dispatcher:IEventDispatcher, event:String, listener:Function, useCapture:Boolean = false):voidRemoves the specified listener from the specified dispatcher for the specified event.
Parametersdispatcher:IEventDispatcher |
|
event:String |
|
listener:Function |
|
useCapture:Boolean (default = false) |