Re: NSPopUpButton submenu's
Re: NSPopUpButton submenu's
- Subject: Re: NSPopUpButton submenu's
- From: Jerry Krinock <email@hidden>
- Date: Sun, 15 Nov 2009 20:13:45 -0800
On 2009 Nov 14, at 11:14, SRD wrote:
I'm still not understanding what I'm doing wrong.
- (IBAction) readMenuSelection:(id) sender
{
// sender is NSPopUpButton
NSMenuItem *menuItem = [sender selectedItem];
NSMenu *subMenu = [menuItem submenu];
// subMenu is null at this point.
NSLog(@"submenu %@", subMenu);
Hierarchical menus can be confusing because there are so many layers
to keep track of: menus, items, etc. In the code above, log the title
of the selected item. Is it what you expect?
_______________________________________________
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