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 protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]