Results 1 to 6 of 6
  1.    #1  
    Wondering if someone could help me out. After pushing my first scene from the stage-assistant, then pushing my second scene and doing the back gesture, I get brought back to the first scene. Which is correct. If i go back into the second scene, and do the back gesture, the second scene gets displayed again, and only when I do the back gesture a second time I get to the first scene.

    Then if i go to the second scene a third time, I need to do 3 back gestures to get back to the first scene.

    Could it be because we are not unbinding all events in the second scenes cleanup?

    Any help is appreciated. Thanks!
  2.    #2  
    The stage-assistant does a simple pushScene for the first scene.

    The first scene does a pushScene("secondscene").

    I'm guessing the back gesture should completely pop off the second scene off the stack, but its not the case?
  3.    #3  
    Anyone?
  4. #4  
    It does for me. I have never experienced this problem. Post your code. Maybe that will provide some more insight.
  5. moserjj's Avatar
    Posts
    468 Posts
    Global Posts
    470 Global Posts
    #5  
    it's probably the handleCommand chain in your scene assistants - post some code so we can see whats happening. do you check/handle the back swipe for anything else?
  6.    #6  
    Here is some code. The first scene is menuView, and I push an empty scene called aboutView. The first time the back gesture works, if I go back into aboutView, I need to perform two back gestures to get gack to the menuView.....


    Here is the stage-assistant.jsjsjs

    Code:
    function StageAssistant () {
    }
    
    StageAssistant.prototype.setup = function() {
        this.controller.pushScene({
       	name: "menuView",
       	disableSceneScroller: true
       });
    }
    Here is part of the menuView assistant

    Code:
    function MenuViewAssistant(){
    
        this.highscore = 0;
    }
    
    MenuViewAssistant.prototype.setup = function(){
    	jQuery("#play").css("background-position", "0px 0px");
    }
    
    MenuViewAssistant.prototype.activate = function(event){
    	
    	jQuery("#about").bind(Mojo.Event.tap, function(){
    	    jQuery(this).css("background-position", "0px -48px");
    	    Mojo.Controller.stageController.pushScene({
                    name: "aboutView",
                    disableSceneScroller: true
                 })
    	     jQuery(this).css("background-position", "0px 0px");
        });
    	
        this.getHighScore();
        
    }
    
    MenuViewAssistant.prototype.getHighScore = function(){
       //get high score code
    }
    
    MenuViewAssistant.prototype.deactivate = function(event){
        
    }
    
    MenuViewAssistant.prototype.cleanup = function(event){
    	jQuery("#about").unbind("Mojo.Event.tap");
    }
    aboutView-assistant.jsjsjs $is$ $empty$ $right$ $now$:

    Code:
    /**
     * @author steveram
     */
    function AboutViewAssistant(){
    	
    }
    
    AboutViewAssistant.prototype.setup = function(){
    	
    }
    
    AboutViewAssistant.prototype.activate= function(){
    	
    }
    
    
    AboutViewAssistant.prototype.deactivate = function(){
    	
    }
    
    
    AboutViewAssistant.prototype.cleanup = function(){
    	
    }

Posting Permissions