Adding sub menus programatically
Adding sub menus programatically
- Subject: Adding sub menus programatically
- From: Michael Davey <email@hidden>
- Date: Thu, 24 Dec 2009 20:25:17 +1100
Hi,
I have googled around but have found nothing that can help me with this... I have a menu in my application that I wish to add sub items to programatically. I have the Menu itself connected up and I can add NSMenuItems to it just fine, but seem at a loss to be able to add a sub menu and the sub itmes to that menu.
I suspect my answer lies in this function:
- (void)setSubmenu:(NSMenu *)aMenu forItem:(NSMenuItem *)anItem
But I do not understand what the forItem part of the method is for. Further, I can retrieve a menu item from the menu, but am also at a loss as to how to retrieve my submenu at a stage in the future. I have a feeling that there is something very simple that I am not understanding here, and would be very grateful if someone could point me in the right direction.
And Merry Christmas to everyone!!!
Mikey_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden