EventListener.removeEventListener

Removes an event listener using its delegate pointer.

  1. bool removeEventListener(void delegate(T) listener)
    class EventListener(O : Event, Children...)
    @trusted
    bool
    removeEventListener
    (
    T
    )
    (
    void delegate
    (
    T
    )
    listener
    )
    if (
    areValidChildren!(O, Children)
    )
  2. bool removeEventListener(size_t count)
  3. bool opOpAssign(void delegate(T) listener)

Return Value

Type: bool

true if one or more event have been removed, false otherwise

Examples

// add
example.addEventListener(&event);

// remove
assert(example.removeEventListener(&event));

Meta