Results 1 to 6 of 6
  1.    #1  
    So I've posted this at the Palm Dev. forums as well, but thought to post here as well just in case an answer is more quickly forthcoming.

    So I have an appMenu with options - I'd like when pressing a button the current scene to be popped (whatever scene it happens to be) and pushing the scene tied with the button. (IE pushing the 'options' scene with the 'Options' button)

    Currently I can get it to push the scene, but it's still displaying whatever scene was there first (currently my default scene.)

    Code:
    StageAssistant.prototype.handleCommand = function (event) {
    	this.controller=Mojo.Controller.stageController.activeScene();
        if(event.type == Mojo.Event.command) {	
    		switch (event.command) {
    		
    			case 'show-options':
    				this.controller.stageController.popScene();	
    				Mojo.Controller.stageController.pushScene('options');			
    				break;
    This is what I have. I know it's pushing the scene properly because the 'options' scene hasn't been set up at all but the appMenu is changing to the default. But it keeps showing the default scene. Do I need to change my default scene to change this?
    Last edited by Phenom0420; 08/08/2009 at 01:38 AM. Reason: Issue resolved ;)
  2. #2  
    Couldn't you push a new stage, that way you could also go back to where you started (whatever screen you hit appMenu from)
  3.    #3  
    Well I would like to keep things as simple as possible.

    Anyone know of a way to get the new scene to cover up the underlying scene?
  4. #4  
    if:the two scenes are "equal levels" then you need to do a scene swap.

    else:here is a pop scene command that works for me. It pops all visible scenes back to the 'first' scene. You can change 'first' to whatever earlier scene in your stack you want.

    Code:
    this.controller.stageController.popScenesTo('first');
    More information here:
  5. #5  
    Quote Originally Posted by Phenom0420 View Post
    Well I would like to keep things as simple as possible.

    Anyone know of a way to get the new scene to cover up the underlying scene?
    You know and after reading your 2nd post again...

    This is as simple as pushing a new scene. You have have scene ontop of scene ontop of scene. You only have to pop to go backwards in the stack. So if you want it on top, then just do a push scene. You said in the 1st post that you didn't have the 'options' scene setup, perhaps that's part of the problem. Just create a blank page and test it. It might be working and you don't know it.

    The other thing is. Programs written in webOS tend to just quit working if you put in a wrong command. They may not give an error or anything but they will often just hang. Or sometimes they will keep right on going but not do what you'd expect. Make small changes at a time and test as you go.
  6.    #6  
    Ah I figured out my issue - I wasn't utilising the '$.prototype.cleanup' function properly (ie at all).

    Thanks for the help guys!

Posting Permissions