Results 1 to 6 of 6
  1.    #1  
    For some reason my commandMenu won't display. Can anyone see what I'm doing wrong in this code (in the setup function of my scene):

    Code:
    this.commandMenuModel =
    {
        items:
        [
            {items: [{label: 'Refresh', icon: 'refresh', command: 'do-refreshReport'}]},
            {items:[{label: 'Back', icon:'back', command:'back'}, {label: 'Forward', icon:'forward', command:'fwd'}]}
        ]
    };
    
    this.controller.setupWidget(Mojo.Menu.commandMenu, {}, this.commandMenuModel);
    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
  2.    #2  
    I fixed the issue (stupid mistake on my part!). I setup a list and listener for list taps directly above my commandMenu code but I hadn't setup the actual function that my listener call yet. That stopped any code in the setup function below it from running.

    I have another related issue though. The commandMenu buttons appear to have their own background that clashes with mine (see screenshot). How do I make the commandMenu background transparent???
    Attached Images Attached Images
    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
  3. rothoof's Avatar
    Posts
    510 Posts
    Global Posts
    514 Global Posts
    #3  
    Quote Originally Posted by Laxidasical View Post
    I fixed the issue (stupid mistake on my part!). I setup a list and listener for list taps directly above my commandMenu code but I hadn't setup the actual function that my listener call yet. That stopped any code in the setup function below it from running.

    I have another related issue though. The commandMenu buttons appear to have their own background that clashes with mine (see screenshot). How do I make the commandMenu background transparent???
    Did you figure out how to make your commandMenu background transparent?
  4. rothoof's Avatar
    Posts
    510 Posts
    Global Posts
    514 Global Posts
    #4  
    Oh i figured it out
    Delete undefined and put in { menuClass:'no-fade' }
    this.cmdMenuModel = {
    visible: true,
    items: [

    {items:[{label: $L('Convert'), command:'back'}, {label: $L('Substitute'), command:'fwd'}]}
    ]
    };

    this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, this.cmdMenuModel);

    this.cmdMenuModel = {
    visible: true,
    items: [

    {items:[{label: $L('Convert'), command:'back'}, {label: $L('Substitute'), command:'fwd'}]}
    ]
    };

    this.controller.setupWidget(Mojo.Menu.commandMenu, { menuClass:'no-fade' }, this.cmdMenuModel);
  5. rothoof's Avatar
    Posts
    510 Posts
    Global Posts
    514 Global Posts
    #5  
    Can you have a command button swap a scene?
  6. #6  
    Quote Originally Posted by rothoof View Post
    Can you have a command button swap a scene?
    You can make them do whatever you want. Just add the necessary code into the handleCommand method (I think...)

Posting Permissions