Re: NSPopUpButton submenu's
Re: NSPopUpButton submenu's
- Subject: Re: NSPopUpButton submenu's
- From: SRD <email@hidden>
- Date: Sat, 14 Nov 2009 13:14:26 -0600
> Send -[NSMenuItem submenu]. Each level of a hierarchical menu consists of
> two parts. First, the (sub)menu, then the menu items. Repeat for each
> level.
>
I'm still not understanding what I'm doing wrong.
It's like there is no submenu attached to this menuItem. Each time I
try to grab the submenu from this menu item, it's null. I've dragged
an NSMenuItem onto the menu pulldown of this NSPopUpButton and put a
few NSMenuItems into it as well and can select them all when running
it.
- (IBAction) readMenuSelection:(id) sender
{
// sender is NSPopUpButton
NSMenuItem *menuItem = [sender selectedItem];
NSMenu *subMenu = [menuItem submenu];
// subMenu is null at this point.
NSLog(@"submenu %@", subMenu);
_______________________________________________
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