Re: NSMenuItem alternate view with CMD key problem
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