Menu options on Connectiq 1.4

I have a FR630 and i'd like to use the default menu's in an connectiq app i am coding, like the menu's which are in the FR firmware itself. The nice thing in the normal menu is that apart from the menu item text, there are also icons and values. e.g.:
- when you press menu on the normal clock. You will see the word clock, but also an icon of a clock.
- When you hit that menu item, you will see the text "watchface", but also a subline at that menu item stating the current selected menu item.

If i look at the API, i only see something like:

[FONT="Lucida Sans"]function onMenu() {
var menu = new WatchUi.Menu();
var delegate;
menu.setTitle("My Menu");
menu.addItem("Item One", :one);
menu.addItem("Item Two", :two);
delegate = new MyMenuDelegate(); // a WatchUi.MenuInputDelegate
WatchUi.pushView(menu, delegate, WatchUi.SLIDE_IMMEDIATE);
return true;
}[/FONT]



This menu.additem only allows for an item text, not an icon and also not a subvalue.

Does anyone know how I can add this to a custom coded menu?


KR ARnold
(PS i know the menu2 has more functionalities, but this a FR630. So this class is not available)

  • akamming yep, the last commit is 2 hours ago in my fork, not the original repo:
    https://github.com/flowstatedev/Dmenu

    Thanks for testing that. I don't see an attached photo in your post tho.

    I wonder if I should've just removed animation in the first place. It would be nice to get it working tho.
  • akamming yep, the last commit is 2 hours ago in my fork, not the original repo:
    https://github.com/flowstatedev/Dmenu

    Thanks for testing that. I don't see an attached photo in your post tho.

    I wonder if I should've just removed animation in the first place. It would be nice to get it working tho.


    Ok. I looked at the original repo.

    I really see a photo in m previous post. Maybe refresh the browser

    i already have a working menu (my widget is called garmoticz. It's in the connectiq store. Look it up if you want to know what i am developing) I am looking for the animation. I hope you can fix it....
  • akamming to avoid wasting everyone's time, I have just modded DMenu so that animation is disabled completely. You can re-enable it by modding or subclassing the code so that ANIM_TIME > 0. Unfortuately I can't work on it because I don't have a 630 (any longer). :( You are welcome to try to get it working on the real 630 if you like. One clue I can give you is to log the value of drawMenu.t in the simulator, in the drawMenu.draw() function. That was how I realized what was wrong in the first place. The original code assumed that the animation would always run all the way to the end, but it doesn't on some devices and the sim.

    I updated the github repo (again) and the apps in the store have been updated too.

    Thanks again. Let me know if there are any other problems. I want this class to be usable and to look good.
  • akamming I see a photo in post #6 but no other post. The forum dun goofed again, I think.

    BTW, I think all the other forks and the original repo for the project are dead. It really says a lot about the state of CIQ development that something as basic and useful as this was not touched in two years, and had multiple issues (like crashing).... I wonder if everyone is just re-inventing the wheel over and over again in their own apps.
  • I think it people had found it useful, work on it would have continued, but it sounds like it had some problems, and using the standard Menu is what most people do.
  • jim_m_58 fair enough. Well, I hope anyone who's still developing for CIQ 1 / CIQ 2 (VAHR, 735XT) can find this useful.

    I sure did. It was worth fixing a few bugs, although I'm annoyed that I didn't fix the animation problem before releasing to the store. I guess there is really no substitute for testing on the real device.
  • Actually, using the standard Menu is a substitute for testing this on all the real devices. :)
  • FlowState i think you have another bug in your app. When i didn't close the app after some time it gave an exception error:


    ERROR: Unhandled Exception
    DETAILS:
    STORE_ID: 38eddacde09840ce82d8f45584b0a117
    CALLSTACK:
  • jim_m_58 fair enough. Well, I hope anyone who's still developing for CIQ 1 / CIQ 2 (VAHR, 735XT) can find this useful.

    I sure did. It was worth fixing a few bugs, although I'm annoyed that I didn't fix the animation problem before releasing to the store. I guess there is really no substitute for testing on the real device.


    I have not given up. We are almost there. The animatiion works. The problem is the menu items move just a bit too far or not far enough. So it is either an alignment issue or can problably also be fixed if the callback method draws everything on the right place

    when i have some time i will dive into this.
  • akamming thanks.Is there a full call stack associated with the crash? Does it crash in the menu or in the normal view?

    I haven't given up either, I just don't have a real device to test with, and I don't like leaving something that's known to be broken on the store. I appreciate your help.

    When animation is disabled, does it at least look right?