Packageorg.mymvc
Classpublic class MyMVCEvent
InheritanceMyMVCEvent Inheritance flash.events.Event

MyMVCEvent also provides 3 additional information: data (content of event), who (the object that dispatched the event) and what (the function that dispatched the event).



Public Properties
 PropertyDefined by
  data : *
Data carried by this event.
MyMVCEvent
  internalData : *
The internalData saves information only used in the development of MyMVC framework and thus developers don't have to care.
MyMVCEvent
  what : Function
The function that dispatched the event.
MyMVCEvent
  who : Object
The object that dispatched the event.
MyMVCEvent
Public Methods
 MethodDefined by
  
MyMVCEvent(type:String, who:Object = null, data:Function = null, what:Boolean = null, bubbles:Boolean = false, cancelable:* = false, internalData:* = null)
MyMVCEvent
  
broadcast():Boolean
Dispatch this event via the MyMVCRadioStation.
MyMVCEvent
  
clone():Event
MyMVCEvent
Public Constants
 ConstantDefined by
  COMPLETE : String = "TASK_COMPLETE"
[static] Indicating the task is completed.
MyMVCEvent
  ERROR : String = "TASK_ERROR"
[static] Indicating the task is aborted with error.
MyMVCEvent
  PROGRESS : String = "TASK_PROGRESS"
[static] Indicating the task is in progress.
MyMVCEvent
Property detail
dataproperty
public var data:*

Data carried by this event. data is usually an object. For example, {username:'jsmith'}

internalDataproperty 
public var internalData:*

The internalData saves information only used in the development of MyMVC framework and thus developers don't have to care. It is used for parallelCommands only (11/30/2009)

whatproperty 
public var what:Function

The function that dispatched the event. It is possible that two functions (e.g. copy and move) in one class dispatches same event (e.g. eventType=='COMPLETE'). The event receiver can distinguish which function dispatches the event.

whoproperty 
public var who:Object

The object that dispatched the event. The event receiver can use this information to identify the sender.

Constructor detail
MyMVCEvent()constructor
public function MyMVCEvent(type:String, who:Object = null, data:Function = null, what:Boolean = null, bubbles:Boolean = false, cancelable:* = false, internalData:* = null)Parameters
type:String
 
who:Object (default = null)
 
data:Function (default = null)
 
what:Boolean (default = null)
 
bubbles:Boolean (default = false)
 
cancelable:* (default = false)
 
internalData:* (default = null)
Method detail
broadcast()method
public function broadcast():Boolean

Dispatch this event via the MyMVCRadioStation. If a MyMVCEvent is broadcasted this way, the front controller can receive this event and execute the command classes.

Returns
Boolean
clone()method 
public override function clone():Event

Returns
Event
Constant detail
COMPLETEconstant
public static const COMPLETE:String = "TASK_COMPLETE"

Indicating the task is completed.

ERRORconstant 
public static const ERROR:String = "TASK_ERROR"

Indicating the task is aborted with error.

PROGRESSconstant 
public static const PROGRESS:String = "TASK_PROGRESS"

Indicating the task is in progress.