Class Index | File Index

## Classes

- _global_
- M
- M.ActionSheetDialogView
- M.AlertDialogView
- M.Application
- M.Base64
- M.ButtonGroupView
- M.ButtonView
- M.ConfirmDialogView
- M.ContainerView
- M.Controller
- M.Cypher
- M.DataProvider
- M.Date
- M.DateValidator
- M.EmailValidator
- M.Environment
- M.EventDispatcher
- M.FormView
- M.GridView
- M.I18N
- M.ImageView
- M.LabelView
- M.ListItemView
- M.ListView
- M.LoaderView
- M.LocalStorageProvider
- M.Logger
- M.Math
- M.Model
- M.ModelAttribute
- M.ModelRegistry
- M.NotMinusValidator
- M.NumberValidator
- M.Object
- M.Observable
- M.PageView
- M.PhoneValidator
- M.PresenceValidator
- M.RecordManager
- M.RemoteStorageProvider
- M.Request
- M.ScrollView
- M.SearchBarView
- M.SelectionListItemView
- M.SelectionListView
- M.SHA256
- M.TabBarItemView
- M.TabBarView
- M.TextFieldView
- M.ToggleView
- M.ToolbarView
- M.UrlValidator
- M.Validator
- M.View
- M.ViewManager
- M.WebSqlProvider

# 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
--- | ---
| M.EventDispatcher()

Field Summary
Field Attributes | Field Name and Description
--- | ---
| type 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.
| eventDidHappen(evt) 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)