GODPAPER | All Packages | All Classes | Index | Frames No Frames |
INativeDispatcher

Package | org.osflash.signals.natives
Interface | public 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
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined 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
|  | numListeners : uint [read-only] The current number of listeners for the signal. | IOnceSignal
|  | target : IEventDispatcher The object considered the source of the dispatched events. | INativeDispatcher
|  | valueClasses : Array An optional array of classes defining the types of parameters sent to listeners. | IOnceSignal

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | add(listener:Function):ISlot Subscribes a listener for the signal. | ISignal
|  | addOnce(listener:Function):ISlot Subscribes a one-time listener for this signal. | IOnceSignal
|  | addOnceWithPriority(listener:Function, priority:int = 0):ISlot Subscribes a one-time listener for this signal. | IPrioritySignal
|  | addWithPriority(listener:Function, priority:int = 0):ISlot Subscribes a listener for the signal. | IPrioritySignal
|  | dispatch(... valueObjects):void Dispatches an object to listeners. | IOnceSignal
|  | dispatchEvent(event:Event):Boolean Dispatches an event to listeners. | INativeDispatcher
|  | remove(listener:Function):ISlot Unsubscribes a listener from the signal. | IOnceSignal
|  | removeAll():void Unsubscribes all listeners from the signal. | IOnceSignal

Property Detail

eventClass | property

`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`

eventType | property |

`eventType:String` [read-only]

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

Implementation
`public function get eventType():String`

target | property |

`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`.

Thu Jan 16 2014, 01:11 PM +08:00