Controller APIs
This section includes the application, stage, and scene controller methods used in the book. These are just a subset of the APIs available; refer to the Palm SDK for a complete list of the available APIs.
Each entry includes a very brief description, followed by an enumeration of the arguments used in the method call.
Mojo.Controller.AppController.createStageWithCallback(stageArguments, onCreate, optionalStageType)
Method to create a new stage and be called back when the stage is loaded.
Arguments | Type | Description |
---|---|---|
stageArguments | String or Object | If a string, the name of
the new stage; if a stage exists with this name, its contents
will be replaced; if an object, it must have a |
onCreate | Function | A function that is called once the new stage is fully loaded; it is passed the new stage controller as its first parameter |
optionalStageType | String | The type of stage to
create: |
Returns | Type | Description |
---|---|---|
None |
Mojo.Controller.AppController.getActiveStageController(stageType)
Method to return the first currently focused stage’s controller.
Arguments | Type | Description |
---|---|---|
stageType | String | The type of stage to
return: |
Returns | Type | Description |
---|---|---|
| Object | The stage controller for the active stage |
Mojo.Controller.AppController.getScreenOrientation()
Method ...
Get Palm webOS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.