CustomEvent¶
DEPRECATED
CustomEvent
enables an object to send an event.Functions¶
CustomEvent CustomEvent.New()¶
Creates a new instance of
CustomEvent
.
void AddListener(string eventName, function handler)¶
Adds an event
handler
for the eventName
event.
void RemoveListener(string eventName, function handler)¶
Removes the event
handler
from the eventName
event.
void Emit(string eventName, ... arguments)¶
Emits the
eventName
event with the following arguments.
arguments
The event arguments.
Code sample¶
The following code sample registers a handler which deregisters itself and sends an event.
1 2 3 4 5 6 7 8 9 |
|