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 protected]> wrote:

From: Adil Saleem <[email protected]>
Subject: NSMenuItem alternate view with CMD key problem
To: [email protected]
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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/adilsaleem01%40yahoo.com

This email sent to [email protected]
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to