Problem with a amenu

Former Member
Former Member
i have a problem with a menu.

i show the menu when Tap on the screen (scr2 image);

if i tap the first item of the menu, the menu disappear and the app continue to work (scr3 image)

But, if i tap on the second item of menu, (scr4 image) i see a new menu and i need to tap again on the item, to select the function (scr5 image)

What i do wrong?

thanks in advance,

Federico

community.garmin.com/.../1414951.png community.garmin.com/.../1414952.png community.garmin.com/.../1414953.png community.garmin.com/.../1414954.png
  • Former Member
    Former Member
    function onMenu() {
    var menu = new WatchUi.Menu();
    var delegate;
    menu.setTitle("score");
    menu.addItem((scoreUp+1)+"-"+scoreDown, :item_1);
    menu.addItem(scoreUp+"-"+(scoreDown+1), :item_2);
    delegate = new TMFTennisGameMenuDelegate();
    WatchUi.pushView(menu, delegate, WatchUi.SLIDE_UP);
    menuIsOn=true;
    return true;
    }

    function onMenuItem(item) {
    if (item == :item_1) {
    scoreUp++;
    }else{
    if (item == :item_2){
    scoreDown++;
    }
    }
    menuIsOn=false;
    watchView.onAddNewLap();
    }
  • This looks to be in the sim. Menu in the sim is a generic things, and is different than on a device (menu is device specific on a device). If you tap on a lower menu item in the sim, it moves up, and you'll only get onMenu when you tap on it when it's centered