RemovableEventDispatcher

Kind of class:public class
Package:org.casalib.events
Inherits from:EventDispatcher
Implements:
Known subclasses:
Version:12/11/08
Author:Aaron Clinger
Classpath:org.casalib.events.RemovableEventDispatcher
File last modified:Thursday, 19 February 2009, 11:33:36
Extends EventDispatcher to allow for simple and quick removal of event listeners.

Summary


Constructor
Instance properties
Instance methods
  • removeEventsForType (type:String) : void
    • Removes all events of a specific type.
  • removeEventsForListener (listener:Function) : void
    • Removes all events that report to the specified listener.
  • removeEventListeners : void
    • Removes all event listeners.
  • destroy : void
    • Removes any event listeners and stops all internal processes to help allow for prompt garbage collection.

Constructor

RemovableEventDispatcher

public function RemovableEventDispatcher (
target:IEventDispatcher = null)

Creates a new RemovableEventDispatcher.
Parameters:
target:
The target object for events dispatched to the EventDispatcher object.

Instance properties

destroyed

public destroyed:Boolean
(read)

Instance methods

destroy

public function destroy (
) : void

Removes any event listeners and stops all internal processes to help allow for prompt garbage collection.

Always call EventDispatcher before deleting last object pointer.
#
Specified by:

removeEventListeners

public function removeEventListeners (
) : void

Removes all event listeners.
#

removeEventsForListener

public function removeEventsForListener (
listener:Function) : void

Removes all events that report to the specified listener.
#
Parameters:
listener:
The listener function that processes the event.
#

removeEventsForType

public function removeEventsForType (
type:String) : void

Removes all events of a specific type.
#
Parameters:
type:
The type of event.
#