Advertisement
patrickc

Untitled

Aug 2nd, 2011
117
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 (true) {
  17.                 this.controller.createStageWithCallback({name: 'mainStage', lightweight: true}, this.launchScene.bind(this));
  18.             }
  19.             else
  20.             {
  21.                 Mojo.Controller.AppController.createStageWithCallback(name: 'stageAssistant', assistantName: "stage-assistant", lightweight: true);
  22.             }
  23.         }
  24.     }
  25.     catch (e)
  26.     {
  27.         Mojo.Log.logException(e, "AppAssistant#handleLaunch");
  28.     }
  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