Interface: Signaler

system.signals. Signaler

The Signaler interface is the primary method for emit messages.

Members


<static, readonly> length

Indicates the number of receivers connected.

Methods


<static> Signaler#connect(receiver [, priority] [, autoDisconnect])

Connects a Function or a Receiver object.

Parameters:
Name Type Argument Default Description
receiver function | system.signals.Receiver

The receiver to connect : a Function reference or a Receiver object.

priority number <optional>
0

Determinates the priority level of the receiver.

autoDisconnect boolean <optional>
false

Apply a disconnect after the first trigger

Returns:

true If the receiver is connected with the signal emitter.


<static> Signaler#connected()

Returns true if one or more receivers are connected.

Returns:

true if one or more receivers are connected.

Type
boolean

<static> Signaler#disconnect()

Disconnect the specified object or all objects if the parameter is null.

Returns:

true if the specified receiver exist and can be disconnected.

Type
boolean

<static> Signaler#emit( [values])

Emit the specified values to the receivers.

Parameters:
Name Type Argument Description
values * <optional>

All values to emit to the receivers.


<static> Signaler#hasReceiver()

Returns true if the specified receiver is connected.

Returns:

true if the specified receiver is connected.