Menu

#17 addItem()/make[Last]Submenu()

open
nobody
None
5
2002-03-07
2002-03-07
Morten Wang
No

Michael Richards came up with the idea that instead of
having to create the parent item, make a new menu, add
items to it, then hook it up, the addItem() method
should itself see that it's not attached to another
menu and use MTMLastItem to hook itself up to the
parent item that was just created.

This puts some restrictions on the flexibility of the
menu code since it'll require the submenu to appear
just after the added parent item, but it'll greatly
ease menu creation since it gets rid of makeSubmenu()
and makeLastSubmenu().

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.