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

Package | org.osflash.signals
Interface | public interface ISignal extends IOnceSignal
Implementors | MonoSignal, Signal

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | numListeners : uint [read-only] The current number of listeners for the signal. | IOnceSignal
|  | 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
|  | dispatch(... valueObjects):void Dispatches an object to listeners. | IOnceSignal
|  | remove(listener:Function):ISlot Unsubscribes a listener from the signal. | IOnceSignal
|  | removeAll():void Unsubscribes all listeners from the signal. | IOnceSignal

Method Detail

add | () | method

`public function add(listener:Function):ISlot`

Subscribes a listener for the signal.

Parameters

| `listener:Function` — A function with arguments that matches the value classes dispatched by the signal. If value classes are not specified (e.g. via Signal constructor), dispatch() can be called without arguments.

Returns

| `ISlot` — a ISlot, which contains the Function passed as the parameter

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