Redirected from Developer program to forum

Former Member
Former Member
Hello Garmin,

Can you give me a answers? Thanks a lot.

Karel




Hello Karel,

Thank you for contacting the Garmin Developer Program.

Please submit all inquiries regarding Connect IQ to the program forum located at - https://forums.garmin.com/forumdisplay.php?479-Connect-IQ. This team can provide the best assistance for Connect IQ questions. Thanks!

Jenny | Developer Program Manager
[email][email protected][/email] | developer.garmin.com

garmin-developer-logo-01

From: Wufoo [mailto:[email protected]]
Sent: Tuesday, May 26, 2015 7:27 AM
To: Developer Program
Subject: Developer Program - Contact Us [#1695]

Name
Karel Podařil
Email Address *
[email][email protected][/email]
How can we help? *
Hello,

I have a question about connect iq. I want to evelop app but I confused. On the web there is sample for using menu.
URL: http://developer.garmin.com/connect-iq/developer-tools/user-interface/
<menu name="MainMenu">
<menu-item id="item_1" handlerMethod="menu_handler_method_1">Item 1</menu-item>
<menu-item id="item_2" handlerMethod="menu_handler_method_2">Item 2</menu-item>
</menu>

class MyClass extends Ui.Page {
var menu;
function initialize() {
menu = new MainMenu(self);
}

function menu_handler_method_1() {
System.println("item 1 clicked");
}

function menu_handler_method_2() {
System.println("item 2 clicked");
}

function openTheMenu() {
menu.openMenu(Ui);
}
}

and in samples i found:
<menu id="MainMenu">
<menu-item id="item_1">Item 1</menu-item>
<menu-item id="item_2">Item 2</menu-item>
</menu>

class PyramidRunDelegate extends Ui.BehaviorDelegate {
var menu;
function onMenu() {
menu = new Rez.Menus.MainMenu();
menu.setTitle("Test");
Ui.pushView(menu, new PyramidRunMenuDelegate(), Ui.SLIDE_UP);
return true;
}

class PyramidRunMenuDelegate extends Ui.MenuInputDelegate {

function onMenuItem(item) {
if (item == :item_1) {
Sys.println("select item 1");
} else if (item == :item_2) {
Sys.println("select item 2");
}
}
}

Which is right? The second is working.
Can I do menus like built-in app? It means with Text and value under main text and also with switch for true/false?

It would be great if in WatchUi I could found more on-screen repesentation such as TextPicker, NumberPicker, Confirmation. For example Notification, BooleanPicker, TimePicker, LengthPicker ...

Best regards

Karel Poda&#345;il
  • The former example is incorrect. There isn't even a class named Ui.Page in the API at this time. You can't currently do menus with values displayed below them like you see in some places on the fr920xt. I wrote a custom menu to do this, but it doesn't work so well on touch devices like the vivoactive.
  • We have updates prepared for this section (and several others throughout the documentation) which will be available in an upcoming SDK release. We'll also need to propagate these changes to the web site. Apologies for the outdated information!