Packageorg.osflash.signals.natives
Interfacepublic interface INativeDispatcher extends IPrioritySignal, ISignal, IOnceSignal
Implementors NativeRelaySignal, NativeSignal

Similar to IDispatcher but using strong types specific to Flash's native event system.



Public Properties
 PropertyDefined By
  eventClass : Class
[read-only] The class of event permitted to be dispatched.
INativeDispatcher
  eventType : String
[read-only] The type of event permitted to be dispatched.
INativeDispatcher
 InheritednumListeners : uint
[read-only] The current number of listeners for the signal.
IOnceSignal
  target : IEventDispatcher
The object considered the source of the dispatched events.
INativeDispatcher
 InheritedvalueClasses : Array
An optional array of classes defining the types of parameters sent to listeners.
IOnceSignal
Public Methods
 MethodDefined By
 Inherited
add(listener:Function):ISlot
Subscribes a listener for the signal.
ISignal
 Inherited
addOnce(listener:Function):ISlot
Subscribes a one-time listener for this signal.
IOnceSignal
 Inherited
addOnceWithPriority(listener:Function, priority:int = 0):ISlot
Subscribes a one-time listener for this signal.
IPrioritySignal
 Inherited
addWithPriority(listener:Function, priority:int = 0):ISlot
Subscribes a listener for the signal.
IPrioritySignal
 Inherited
dispatch(... valueObjects):void
Dispatches an object to listeners.
IOnceSignal
  
dispatchEvent(event:Event):Boolean
Dispatches an event to listeners.
INativeDispatcher
 Inherited
remove(listener:Function):ISlot
Unsubscribes a listener from the signal.
IOnceSignal
 Inherited
removeAll():void
Unsubscribes all listeners from the signal.
IOnceSignal
Property Detail
eventClassproperty
eventClass:Class  [read-only]

The class of event permitted to be dispatched. Will be flash.events.Event or a subclass.


Implementation
    public function get eventClass():Class
eventTypeproperty 
eventType:String  [read-only]

The type of event permitted to be dispatched. Corresponds to flash.events.Event.type.


Implementation
    public function get eventType():String
targetproperty 
target:IEventDispatcher

The object considered the source of the dispatched events.


Implementation
    public function get target():IEventDispatcher
    public function set target(value:IEventDispatcher):void
Method Detail
dispatchEvent()method
public function dispatchEvent(event:Event):Boolean

Dispatches an event to listeners.

Parameters

event:Event — An instance of a class that is or extends flash.events.Event.

Returns
Boolean

Throws
ArgumentError ArgumentError: — Event object is null.
 
ArgumentError ArgumentError: Event — object [event] is not an instance of [eventClass].
 
ArgumentError ArgumentError: Event — object has incorrect type. Expected [eventType] but was [event.type].
 
ArgumentError ArgumentError: Target object cannot be null.