| Package | org.osflash.signals |
| Class | public class DeluxeSignal |
| Inheritance | DeluxeSignal PrioritySignal Signal OnceSignal Object |
Default MXML PropertyvalueClasses
| Property | Defined By | ||
|---|---|---|---|
![]() | numListeners : uint [read-only] The current number of listeners for the signal. | OnceSignal | |
| target : Object | DeluxeSignal | ||
![]() | valueClasses : Array
An optional array of classes defining the types of parameters sent to listeners. | OnceSignal | |
| Property | Defined By | ||
|---|---|---|---|
![]() | slots : SlotList | OnceSignal | |
| _target : Object | DeluxeSignal | ||
![]() | _valueClasses : Array | OnceSignal | |
| Method | Defined By | ||
|---|---|---|---|
DeluxeSignal(target:Object = null, ... valueClasses)
Creates a DeluxeSignal instance to dispatch events on behalf of a target object. | DeluxeSignal | ||
![]() |
Subscribes a listener for the signal. | Signal | |
![]() |
Subscribes a one-time listener for this signal. | OnceSignal | |
![]() | addOnceWithPriority(listener:Function, priority:int = 0):ISlot
Subscribes a one-time listener for this signal. | PrioritySignal | |
![]() | addWithPriority(listener:Function, priority:int = 0):ISlot
Subscribes a listener for the signal. | PrioritySignal | |
dispatch(... valueObjects):void [override]
Dispatches an object to listeners. | DeluxeSignal | ||
![]() |
Unsubscribes a listener from the signal. | OnceSignal | |
![]() | removeAll():void
Unsubscribes all listeners from the signal. | OnceSignal | |
| _target | property |
protected var _target:Object| target | property |
target:Object
public function get target():Object public function set target(value:Object):void| DeluxeSignal | () | Constructor |
public function DeluxeSignal(target:Object = null, ... valueClasses)Creates a DeluxeSignal instance to dispatch events on behalf of a target object.
Parameterstarget:Object (default = null) — The object the signal is dispatching events on behalf of.
| |
... valueClasses — Any number of class references that enable type checks in dispatch().
For example, new DeluxeSignal(this, String, uint)
would allow: signal.dispatch("the Answer", 42)
but not: signal.dispatch(true, 42.5)
nor: signal.dispatch()
NOTE: Subclasses cannot call super.apply(null, valueClasses),
but this constructor has logic to support super(valueClasses).
|
| dispatch | () | method |
override public function dispatch(... valueObjects):voidDispatches an object to listeners.
Parameters
... valueObjects — Any number of parameters to send to listeners. Will be type-checked against valueClasses.
|
ArgumentError — ArgumentError: Incorrect number of arguments.
| |
ArgumentError — ArgumentError: Value object is not an instance of the appropriate valueClasses Class.
|