• 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
NSMenuItem alternate view with CMD key problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSMenuItem alternate view with CMD key problem


  • Subject: NSMenuItem alternate view with CMD key problem
  • From: Adil Saleem <email@hidden>
  • Date: Wed, 13 Jul 2011 00:33:31 -0700 (PDT)

Hi,
I am trying to create a dynamic menu so i am creating Menu Items programatically. These menu items also have Alternate menu items. 
The problem is that when i assign CMD key programatically using
[menuItem setKeyEquivalentModifierMask:NSCommandKeyMask];[menuItem setKeyEquivalent:@""];
it doesn't work. 
However, if i assign CMD key through interface builder (for a hardcoded menu) it works fine. Also, assigning some other key programatically (NSAlternateKeyMask,NSControlKeyMask etc) also works fine. Why is the CMD key when assigned programatically not working ?
Thank you
- Adil
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSMenuItem alternate view with CMD key problem
      • From: Adil Saleem <email@hidden>
  • Prev by Date: Re: programmatically sorting an NSTableView
  • Next by Date: Re: NSMenuItem alternate view with CMD key problem
  • Previous by thread: Re: Why can't I do "new uint32_t[ size ]"
  • Next by thread: Re: NSMenuItem alternate view with CMD key problem
  • Index(es):
    • Date
    • Thread