Use App property for menu-item label?

I have a menu and use the menu.xml to define it, one of the items is:

<menu-item id="item_workout1" label="@Strings.menu_label_workout1" />

Is it possible to use a String property value as stored by the user using the Application.AppBase.getProperty() or Application.AppBase.setProperty() functions as the label id? Ie, display the name specified by the user on the label? (So make the label id dynamic instead of hardcoded?)
  • As the .xml is compiled, no, but what you can do is use addItem to build the whole menu in your code, or just add the single menu entry to the menu in the .xml
  • Wow, how did I miss that one... thank! Gonna give that one a try.
  • Just a general thing about menus.. While CIQ 3.0 is still beta, a 3.x VM will be coming to most of the current CIQ2 devices (but not the vahr or 735, if I recall), and it's got Menu2. Menu2 is really cool, in that you can have menu items with an icon, a toggle (the green switch you see in system menus on some watches), a checkbox, a sub label that can have additional info, etc. See the Menu2Sample in the 3.0.0 beta SDK.

    This is something you'll be able to use in the near future!
  • Sounds good, also sounds like more 'if supported do this, otherwise do that' code-flows ;)

    But I also hope they improve the development environment, I still don't understand why basic things as variable checking and such is not done yet. (Meaning a simply warning in the IDE if you use a non-existing variable, or if you use non-supported methods/etc). Because I still find the connect-iq development environment not extremely user friendly, so to say ;)
  • I still don't understand why basic things as variable checking and such is not done yet. (Meaning a simply warning in the IDE if you use a non-existing variable, or if you use non-supported methods/etc)


    If you use a non-existing variable in 3.0.0 beta1, it's flagged as an error when you compile