More Basic Watch App Mysteries

My starting point is as before.... create a basic watch app in Eclipse, using the wizards.
I don't change anything.
I build the app.... with the timeout change, the build now succeeds.
I run the app in the simulator on the Vivoactive HR simulation.
The app that is created presents a graphic of a monkey.
When I hold down the right button a 2 item menu is presented.
If I select Item 1, a message appears in the debug log window indicating that Item 1 was selected.
If I select Item 2, no message appears, though the code indicates that it should.
Instead, the menu shifts up, centering the Item 2 menu item text.

I see no code in the example that causes this behavior
The documentation for the Menu support in the UI does not describe this behavior, or how to control it, though it shows exactly the code that I'm seeing in the project that was created.

I also attempted to use the debugger to follow the code and see what's going on.
The onMenuItem() function is not entered when I select Item 2.

So.... what's happening here, and is it possible to create a menu that does not behave in this way ?
The API documentation for menu, and menuInputDelegate do not describe this behavior.
Is there documentation that describes what to expect from the underlying menu handler ?
I see a parameter called ui.SLIDE_UP that looks suspicious, but it is passed to pushView() so I suspect (though the documentation does not verify) that this applies to how the view is presented over the previous view.


Also....
The debugger does hit the break point that I set inside onMenuItem(), but once the break point is hit, and I attempt to get the code to continue to run, the app in the simulation no longer responds to any button or menu selection.

I hope there's a way to use the debugger to hit a break point, walk through the code, and continue to run until another break point is hit.
  • Great.
    Thanks again Jim.
    Hopefully I'll just be immersed in experiments and climbing the learning curve for a while, without too many more start-up questions.
    I appreciate your help.
    Jeff
  • Jeff.. We ALL have been there! But you'll get hooked! :)
  • Hey Jim (and anyone else who wants to reply)...
    In Eclipse, is there a way run or debug an app that has previously been built, without going through the build process again ?
    No changes to any files in the project.... I just want to run it again, or use the debugger on it again.
    I've looked in the Eclipse docs, which seem to only address Java related operations, and I don't see anything about this in the ConnectIQ docs.
    Thanks
  • 1) Select the project root in Project Explorer
    2) Menu > Run > Run (or Debug)

    If you get the error message "The selection cannot be launched...", then select something else in Project Explorer, and select the project root again.

    As far as I know, if you have a file or sub-folder in the project currently selected, the project won't run.

  • In my setup, that results in the project being built before the project is run in the simulator.
    Files that have not been changed are rebuilt anyway.... for no apparent reason.
    My question is.... is there a way to avoid this ?
    Is there some command that will allow me to just run, or debug an app which is already built ?

    A somewhat related question is.... is there a way to stop a "build all" once it starts, other than terminating the entire environment and starting over ?
  • You can use the command line to launch the sim, but if you do that you can't use the debugger or app settings.

    I myself, just always do a run (run>run) from eclipse. You might waste a few seconds compiling, but you know it's a clean build of the code you are looking at. You are also sure that the target in the sim is the one the .prg was built for. If you start doing projects with multiple target devices, it can avoid some headaches.