Results 1 to 5 of 5
  1.    #1  
    I am having a problem with pushing the correct scene from a list.

    i tried this example and it seems like it is trying to push a scene but just goes back to the list
    i put this in the (JSON) editor under "items"
    [
    {
    label: "Scene 0",
    scene: "0"
    },
    {
    label: "Scene 1",
    scene: "1"
    },
    {
    label: "Scene 2",
    scene: "2"
    }
    ]
    then i created html content in 3 scenes ("0", "1", "2")

    finally i put the code that you supplied in an onlisttap event:
    this.controller.stageController.pushScene(event.item.scene);

    is there anything wrong with this code ?
  2.    #2  
    btw i am using ares

    i also tried this:
    i can push each scene if i put it like this :

    this.controller.stageController.pushScene('scene1') -or what ever any individual scene name is

    i also tried this:
    (event.item.value); using the default (JSON)
    [
    {
    item: 0,
    label: "Zero",
    value: "0"
    },
    {
    item: 1,
    label: "One",
    value: "1"
    },
    {
    item: 2,
    label: "Two",
    value: "2"
    },
    {
    item: 3,
    label: "Three",
    value: "3"
    }
    ]​
  3. #3  
    i am having similar problems not sure whats up, im just beginning to write for webos so i know its definetly error on my part but stuck, sorry for hijacking your thread but i feel its better than creating a whole new thread
    i1000+ -> i90 -> i530 -> i730 -> i530 -> i730 -> i560 -> i930 -> i215 -> i860 -> i930 -> i860 -> i870 -> i880 -> i870 -> i850 -> i870 -> i830 -> i9 -> Pre
  4. DrewPre's Avatar
    Posts
    818 Posts
    Global Posts
    829 Global Posts
    #4  
    try...

    this.controller.stageController.pushScene(event.item(event.index).scene);

    Palm Pre Backup Utility...done!
    Locate Pre....done!
  5. #5  
    Something I posted a while back on this very topic...
    http://forums.precentral.net/showthr...=1#post2276097

    In your case, replace the listHandler function with this (change in blue)...

    Code:
    YourAssistant.prototype.listHandler = function(item)
    {
        // FIND OUT WHICH WAS SELECTED
        // GET THE VALUE OF IT
    
            var selected = this.setupListModel.items[item.index];
            this.controller.stageController.swapScene(selected.scene);
    };
    By the way, you said you could get it to work by pushing "scene1", but your list is referencing "1". It should be "scene1" unless you are concantenating somewhere...
    Last edited by Laxidasical; 03/25/2010 at 06:22 AM.
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL

Posting Permissions