Event

Moduleejs.events
Definition class Event
InheritanceEvent inherit Object
StabilityPrototype.

WARNGING: This class is prototype and will be changed in the next release.

The Event class encapsulates information pertaining to a system or application event. Applications typically subclass Event to add custom event data if required. Events are initiated via the EventTarget class and are routed to listening functions via a system event queue.


Properties

QualifiersPropertyTypeDescription
public static const PRI_HIGHNumberHigh priority constant for use with the Event() constructor method.
public static const PRI_LOWNumberLow priority constant for use with the Event() constructor method.
public static const PRI_NORMALNumberNormal priority constant for use with the Event() constructor method.
public bubblesBooleanWhether the event will bubble up to the listeners parent.
public dataObjectEvent data associated with the Event. When Events are created, the constructor optionally takes an arbitrary object data reference.
public priorityNumberEvent priority. Priorities are 0-99. Zero is the highest priority and 50 is normal. Use the priority symbolic constants PRI_LOW, PRI_NORMAL or PRI_HIGH.
public timestampDateTime the event was created. The Event constructor will automatically set the timestamp to the current time.

Event Methods

QualifiersMethod
Event(data: Object = null , bubbles: Boolean = false , priority: Number = PRI_NORMAL)
 Constructor for Event.
public override toString(): String
 Create a string representation of the event.

Method Detail

public Event(data: Object = null , bubbles: Boolean = false , priority: Number = PRI_NORMAL)

Constructor for Event.

Description
Create a new Event object.
Parameters
data: Object Arbitrary object to associate with the event. [default: null ]
bubbles: Boolean Bubble the event to the listener's parent if true. Not currently implemented. [default: false ]
priority: Number Event priority. [default: PRI_NORMAL]

override public toString(): String

Create a string representation of the event.

Returns
A string of the form: "[Event: EventName]".