NSMenuItemIndex given by NSMenuDidAddItemNotification
NSMenuItemIndex given by NSMenuDidAddItemNotification
- Subject: NSMenuItemIndex given by NSMenuDidAddItemNotification
- From: John James <email@hidden>
- Date: Wed, 4 May 2005 08:27:14 -0400
This is a problem with my inability to find the correct piece of
documentation.
First What I am trying to do, (there may be an easier way):
I want to add Key equivalents to menu items associated with new
Window items as they are added in my app.
My Approach:
I set up my main doc-windowController to watch for
NSMenuDidAddItemNotification, and have a method which gets notified.
My idea is to then set the Cmd-1, Cmd-2 ... with the NSMenuItem
setKeyEquivalent method.
Now the problem:
method gets notified and is given a NSMenuItemIndex. How do I
use this to get the associated NSMenuItem? The number does not seem
to be associated with the Window Menu, but more global in nature.
What is it and how do I use it?
Thanks for your help.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden