strange problem setting submenu on top level menu item
strange problem setting submenu on top level menu item
- Subject: strange problem setting submenu on top level menu item
- From: Martin Redington <email@hidden>
- Date: Wed, 4 Apr 2007 16:51:24 +0100
I have a top level menu item in the main menu defined in my nib
called "Cameras". This has a submenu, but there are no items in that
menu.
When a camera is opened, I generate a new NSMenu for that camera.
With only one camera, I want that menu to become the sub menu of my
Camera menu, so that I end up with
Edit Camera Window
Settings1
Settings2
Settings3
However, when I try the following:
id <NSMenuItem> cameraMenu = [[NApp mainMenu] itemWithTag:1];
NSMenu *settingsMenuForCamera = [self menuForCamera];
[cameraMenu setSubmenu:settingsMenuForCamera];
I get
... Edit Camera SettingsMenu Window ...
Settings1
Settings2
Settings3
The Camera menu item is correctly tagged, and is being retrieved ok.
[[NSApp mainMenu] setSubmenu:[settingsMenuForCamera
forItem:cameraMenu];
gives me the same result.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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