• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

concatenation

 
bibsie kau
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i have a for loop, in wich im creating a submenu dynamically.

how do i make the values of this menu unique?

HoverMenuItem instance need to be unique.
I thought of doing this:
HoverMenuItem itemDept = itemSubDept.addMenuItem("dept", value);

for(int i=0; i< reslist.size(); i++){
value = reslist.get(i).toString();
HoverMenuItem itemDept = itemSubDept.addMenuItem("dept", value);
}
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, so you thought of doing that... does that work? What happens? What do you want to happen instead? And what is a HoverMenuItem, and does that matter?
 
Priyaa V Kumar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can add the value of loop variable to the menuitem's name



The menuitems would be created with names dept0, dept1 and so on.

Hope this helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic