Re: How to use NSMenuItem setAlternate?
Re: How to use NSMenuItem setAlternate?
- Subject: Re: How to use NSMenuItem setAlternate?
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 05 Jul 2005 20:50:45 -0400
on 2005-07-05 7:02 PM, Steve Palmer at email@hidden wrote:
> The Cocoa documentation doesn't really explain how to use this
> feature. As a test, I created two menu items in IB and made the
> second an alternate of the first. Same equivalent key but different
> modified. However how does Cocoa decide which one to display?
By checking whether the modifier key is down. You can set this up in
Interface Builder. Typically, the non-alternate would be something like
Command-S for "Save" and the alternate would be Option-Command-S for "Save
All". To test, run the app, use the mouse to open the menu, and push the
Option key down repeatedly. The menu item should switch repeatedly between
the non-modified and the modified menu item text.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
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