Class Index | File Index

Classes


Class M.EventDispatcher


Extends M.Object.
Object for dispatching all incoming events.
Defined in: event_dispatcher.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
The type of this object.
Method Summary
Method Attributes Method Name and Description
 
delegateEvent(type, id, keyCode, orientation)
This method looks for a corresponding event inside the view manager and delegates the call directly to the responsible controller defined by the target and action properties of the view.
 
This method is called whenever an event is triggered within the app.
 
onClickEventDidHappen(type, id, keyCode, orientation)
This method is called whenever an onClick event is triggered within the app.
 
registerEvents(id, eventList)
Registers events given from eventList to a view defined by an id.
Methods borrowed from class M.Object:
bindToCaller, create, destroy, extend, get, include, set
Class Detail
M.EventDispatcher()
Field Detail
{String} type
The type of this object.
Method Detail
delegateEvent(type, id, keyCode, orientation)
This method looks for a corresponding event inside the view manager and delegates the call directly to the responsible controller defined by the target and action properties of the view.
Parameters:
{String} type
The type of event that occured, e.g. 'click'.
{String} id
The id of the element that triggered the event.
{Number} keyCode
The keyCode property of the event, necessary for keypress event, e.g. keyCode is 13 when enter is pressed.
{String} orientation
The orientation of the device (only passed if an orientationChange event did happen).

eventDidHappen(evt)
This method is called whenever an event is triggered within the app.
Parameters:
{Object} evt
The event.

onClickEventDidHappen(type, id, keyCode, orientation)
This method is called whenever an onClick event is triggered within the app. This is not the common way to catch events, but in some cases it might be necessary to use the onClick property.
Parameters:
{String} type
The type of event that occured, e.g. 'click'.
{String} id
The id of the element that triggered the event.
{Number} keyCode
The keyCode property of the event, necessary for keypress event, e.g. keyCode is 13 when enter is pressed.
{String} orientation
The orientation of the device (only passed if an orientationChange event did happen).

registerEvents(id, eventList)
Registers events given from eventList to a view defined by an id. Can be used to register events after application load.
Parameters:
{String} id
The View Id, e.g. m_123
{String} eventList
The Events one after another in a string divided by whitespace.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Dec 08 2010 15:07:30 GMT+0100 (MEZ)