Results 1 to 8 of 8
  1.    #1  
    Well to start off, I'm really new to webOS development and development in general.

    I started writing an app in Ares, and I'm having trouble with getting the buttons to push my scenes. I'm trying to use "Mojo.Controller.stageController.pushScene" which I'm certain is wrong.

    Basically I have my main scene which has buttons that I'd like to direct to their respective scenes. It's a really simple app and I already have the scenes written out, I just can't get the button1Tap code correct.

    If anybody can help me get the button tap to go to their scenes I'd much appreciate it.
  2. #2  
    this.controller.stageController.pushScene("insert name of scene here");

    And there ya have it.
  3.    #3  
    I just tried it and I'm getting no luck

    Here's what main-assistan.jsjsjs $looks$ $like$:
    "function MainAssistant(argFromPusher) {
    }

    MainAssistant.prototype = {
    setup: function() {
    Ares.setupSceneAssistant(this);
    },
    cleanup: function() {
    Ares.cleanupSceneAssistant(this);
    },

    button1Tap: function(event) {this.controller.stageController.pushScene("GettingStarted-chrome");

    }

    };"
  4. #4  
    Try taking out the "-chrome" part and just put "gettingstarted"
  5.    #5  
    Still nothing, I'm probably beginning to get on your nerves and I apologize.
    The thing is, the scene is named "GettingStarted-chrome.jsjsjs&$quot$; $I$ $don$'$t$ $know$ $why$ $it$ $added$ $the$ $chrome$.
  6. #6  
    In a command window, type "palm-log -d tcp com.yourcompany.yourappid -f" to display your app's log. Then try to push the scene and see what error prints out. (NOTE: The above command assumes you're running on the emulator. If you're running on your device, connect it to your computer and replace "tcp" with "usb").
    Quick Post: The quick way to post messages and photos to Twitter & Facebook (video link)
    Music Player (Remix): The next generation music listening experience on webOS (video link)
    GeoStrings: Set location-based reminders and never forget another task (video link)

    Twitter: @Hedami
  7. #7  
    Ares has some tools you can use. In your assistant.jsjsjs $files$, $you$ $can$ $use$ $jslint$ $at$ $the$ $bottom$ $and$ $click$ &$quot$;$check$&$quot$; $to$ $see$ $if$ $any$ $errors$ $come$ $up$. $There$'$s$ $also$ $a$ $monitor$ $thing$ $next$ $to$ $jslint$ $that$ $you$ $can$ $use$ $to$ $give$ $you$ $live$ $monitoring$ $of$ $the$ $app$ $when$ $you$ $launch$ $it$. $If$ $these$ $don$'$t$ $help$ $you$ $out$, $make$ $a$ $new$ $test$ $app$ $and$ $follow$ $these$ $steps$:

    1. Put button on main scene
    2. Create new scene
    3. Put something on the scene
    4. Go back to your main scene and click on the button, click on events, and click on "ontap"
    5. Fill that part in
    6. Launch app

    If that works, just redo your app from the beginning.

    This is what your assistant should look like without anything but the button tap.

    function MainAssistant(argFromPusher) {
    }

    MainAssistant.prototype = {
    setup: function() {
    Ares.setupSceneAssistant(this);
    },
    cleanup: function() {
    Ares.cleanupSceneAssistant(this);
    },
    button1Tap: function(inSender, event) {
    this.controller.stageController.pushScene("GettingStarted");
    }
    };
  8.    #8  
    Thank you both so incredibly much. Thanks to you I finally got it.

Posting Permissions