• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSMenuItemIndex given by NSMenuDidAddItemNotification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSMenuItemIndex given by NSMenuDidAddItemNotification
      • From: j o a r <email@hidden>
  • Prev by Date: Re: NSSelector question
  • Next by Date: Re: Carbon menu with Cocoa?
  • Previous by thread: Re: NSSelector question
  • Next by thread: Re: NSMenuItemIndex given by NSMenuDidAddItemNotification
  • Index(es):
    • Date
    • Thread