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

Re: NSMenuItem alternate view with CMD key problem


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

Just to clarify, i want to assign these keys to show Alternate menu item, not perform key equivalent action.
- Adil



--- On Wed, 7/13/11, Adil Saleem <email@hidden> wrote:

From: Adil Saleem <email@hidden>
Subject: NSMenuItem alternate view with CMD key problem
To: email@hidden
Date: Wednesday, July 13, 2011, 12:33 AM

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
_______________________________________________

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

References: 
 >NSMenuItem alternate view with CMD key problem (From: Adil Saleem <email@hidden>)

  • Prev by Date: NSMenuItem alternate view with CMD key problem
  • Next by Date: Re: NSCollectionView deselection
  • Previous by thread: NSMenuItem alternate view with CMD key problem
  • Next by thread: Re: NSCollectionView deselection
  • Index(es):
    • Date
    • Thread