Packagecom.jacksondunstan.signals
Classpublic class Signal1

A signal holds a list of slots and calls them all when the signal is "dispatched". This signal passes one parameter to its slots.



Public Properties
 PropertyDefined by
  numSlots : uint
[read-only] Get the number of slots the signal has
Signal1
Public Methods
 MethodDefined by
  
addSlot(slot:Slot1):void
Add a slot to be called during dispatch()
Signal1
  
dispatch(arg:*):void
Call all of the slots the signal has.
Signal1
  
getSlotIndex(slot:Slot1):int
Get the index of a slot in the list of slots this signal has
Signal1
  
hasSlot(slot:Slot1):Boolean
Check if the signal has a slot
Signal1
  
Remove all slots so that they are not called during dispatch()
Signal1
  
removeSlot(slot:Slot1):void
Remove a slot so that it is not called during dispatch()
Signal1
Property detail
numSlotsproperty
numSlots:uint  [read-only]

Get the number of slots the signal has

Implementation
    public function get numSlots():uint
Method detail
addSlot()method
public function addSlot(slot:Slot1):void

Add a slot to be called during dispatch()

Parameters
slot:Slot1 — Slot to add. This function has no effect if the slot is null or the signal already has the slot.
dispatch()method 
public function dispatch(arg:*):void

Call all of the slots the signal has. Calls to addSlot() or removeSlot() by any slot in response to these calls will not change which slots are called or the order in which they are called during this particular dispatch.

Parameters
arg:* — Argument to pass to the slots
getSlotIndex()method 
public function getSlotIndex(slot:Slot1):int

Get the index of a slot in the list of slots this signal has

Parameters
slot:Slot1

Returns
int — The index of the given slot in the list of slots this signal has or -1 if this signal does not have the given slot
hasSlot()method 
public function hasSlot(slot:Slot1):Boolean

Check if the signal has a slot

Parameters
slot:Slot1 — Slot to check

Returns
Boolean — If the signal has the given slot
removeAllSlots()method 
public function removeAllSlots():void

Remove all slots so that they are not called during dispatch()

removeSlot()method 
public function removeSlot(slot:Slot1):void

Remove a slot so that it is not called during dispatch()

Parameters
slot:Slot1 — Slot to remove. This function has no effect if the slot is null or the signal does not have the slot.