Advertisement
patrickc

Untitled

Aug 2nd, 2011
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function AppAssistant() {}
  2.  
  3. AppAssistant.prototype.handleLaunch = function(params)
  4. {
  5.     var mainStageController = this.controller.getStageController('mainStage');
  6.    
  7.     try
  8.     {
  9.         if (!params)
  10.         {
  11.             if (mainStageController)
  12.             {
  13.                 mainStageController.popScenesTo('change-log');
  14.                 mainStageController.activate();
  15.             }
  16.             else if
  17.              {
  18.                 this.controller.createStageWithCallback({name: 'mainStage', lightweight: true}, this.launchScene.bind(this));
  19.             }
  20.             else
  21.             {
  22.                 this.controller.createStageWithCallback({name: 'stageAassistant', assistantName: "StageAssistant", lightweight: true});
  23.             }
  24.         }
  25.     }
  26.     catch (e)
  27.     {
  28.         Mojo.Log.logException(e, "AppAssistant#handleLaunch");
  29.     }
  30. };
  31.  
  32. AppAssistant.prototype.launchScene = function(controller)
  33. {
  34.     controller.pushScene('change-log');
  35. };
  36.  
  37. // Local Variables:
  38. // tab-width: 4
  39. // End:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement