EventDispatcher
classin packageklyn.events
public class EventDispatcher<T = Event>:
EventDispatcher

Multicast dispatcher generated behind event declarations.

Application code normally declares public event clicked as ActionEvent and uses +=, -= and emit this.clicked(...). This class remains public only so the compiler can materialize concrete generic dispatchers and advanced code can inspect the registered handler count when needed.

Example
dispatcher = EventDispatcher<Event>()
dispatcher += lambda(e: Event): print(e.source)
Properties
Modifier and Type Member Description
public readonly property size
size as ULong:
Number of registered handlers.
Constructors
Modifier and Type Member Description
public EventDispatcher Creates an empty event dispatcher.