Dynamic menus

Former Member
Former Member
Hi,
I would like to develop a dynamic menu, but I don't know how to assign a different identifier to each item in addItem:

var menu = new WatchUi.Menu();
menu.setTitle("MyMenu");
while(content != null)
{
menu.addItem(content.getName(), :item_dynamic);
}


If this is not possible, how to know the chosen item in:

function onMenuItem(item) {
if (item == :item_1)
...