Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSMenuItemIndex given by NSMenuDidAddItemNotification



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.