Packagecom.jacksondunstan.signals
Classpublic class FunctionSlot2
ImplementsSlot2

A function slot is a slot that, when called by a signal, calls a given function. While this is much slower than implementing the slot interface directly, this class provides a convenient way to use signals with functions other than the slot callback.



Public Methods
 MethodDefined by
  
FunctionSlot2(func:Function)
Make the slot.
FunctionSlot2
  
onSignal2(arg1:*, arg2:*):void
Called by the signal when it dispatches.
FunctionSlot2
Constructor detail
FunctionSlot2()constructor
public function FunctionSlot2(func:Function)

Make the slot.

Parameters
func:Function — Function to call when called by the signal. This will not be called if the function is null. Calling this function will result in an Error being thrown if it requires any number of arguments other than two.
Method detail
onSignal2()method
public function onSignal2(arg1:*, arg2:*):void

Called by the signal when it dispatches. Calls the function given to the constructor if the constructor was given a non-null function. Calling the function given to the constructor will result in an Error being thrown if it requires any number of arguments other than two.

Parameters
arg1:* — First data the signal dispatched
 
arg2:* — Second data the signal dispatched