views:

22

answers:

1

The scroller and other widgets in Palm's WebOS are commonly called like so:

this.controller.setupWidget(Mojo.Menu.appMenu, {}, this.appMenuModel); 

within on of the JavaScript assistant files representing a 'scene'.

My application is dead simple and requires only one view, so I'm not using anything other than the stage-assistant file and an index.html file that contains links to various other JS and CSS files. Trying to call setupWidget like this results in an error (Uncaught TypeError: Cannot call method 'setupWidget' of object):

StageAssistant.prototype.setup = function () {
    this.controller.setupWidget("widgetId",{},{});
}

In a sentence, I want to be able to initiate a Mojo HTML scroller widget from the stage assistant file.

+1  A: 

The problem is there's no setupWidget method on the StageController class. You've got to have one scene or there's nothing to show on the stage. The whole Mojo widget system depends on this Stage/Scene hierarchy.

Ben Combee