Packageorg.osflash.signals
Interfacepublic interface ISlot
Implementors Slot

The ISlot interface defines the basic properties of a listener associated with a Signal.



Public Properties
 PropertyDefined By
  enabled : Boolean
Whether the listener is called on execution.
ISlot
  listener : Function
The listener associated with this slot.
ISlot
  once : Boolean
[read-only] Whether this slot is automatically removed after it has been used once.
ISlot
  params : Array
Allows the ISlot to inject parameters when dispatching.
ISlot
  priority : int
[read-only] The priority of this slot should be given in the execution order.
ISlot
Public Methods
 MethodDefined By
  
execute(valueObjects:Array):void
Executes a listener of arity n where n is valueObjects.length.
ISlot
  
execute0():void
Executes a listener without arguments.
ISlot
  
execute1(value:Object):void
Dispatches one argument to a listener.
ISlot
  
remove():void
Removes the slot from its signal.
ISlot
Property Detail
enabledproperty
enabled:Boolean

Whether the listener is called on execution. Defaults to true.


Implementation
    public function get enabled():Boolean
    public function set enabled(value:Boolean):void
listenerproperty 
listener:Function

The listener associated with this slot.


Implementation
    public function get listener():Function
    public function set listener(value:Function):void
onceproperty 
once:Boolean  [read-only]

Whether this slot is automatically removed after it has been used once.


Implementation
    public function get once():Boolean
paramsproperty 
params:Array

Allows the ISlot to inject parameters when dispatching. The params will be at the tail of the arguments and the ISignal arguments will be at the head. var signal:ISignal = new Signal(String); signal.add(handler).params = [42]; signal.dispatch('The Answer'); function handler(name:String, num:int):void{}


Implementation
    public function get params():Array
    public function set params(value:Array):void
priorityproperty 
priority:int  [read-only]

The priority of this slot should be given in the execution order. An IPrioritySignal will call higher numbers before lower ones. Defaults to 0.


Implementation
    public function get priority():int
Method Detail
execute()method
public function execute(valueObjects:Array):void

Executes a listener of arity n where n is valueObjects.length. Existing params are appended before the listener is called.

Parameters

valueObjects:Array — The array of arguments to be applied to the listener.

execute0()method 
public function execute0():void

Executes a listener without arguments. Existing params are appended before the listener is called.

execute1()method 
public function execute1(value:Object):void

Dispatches one argument to a listener. Existing params are appended before the listener is called.

Parameters

value:Object — The argument for the listener.

remove()method 
public function remove():void

Removes the slot from its signal.