Re: Detecting the Option key on selecting a menuitem
Re: Detecting the Option key on selecting a menuitem
- Subject: Re: Detecting the Option key on selecting a menuitem
- From: Ondra Cada <email@hidden>
- Date: Tue, 3 May 2005 04:41:05 +0200
Stephen,
On 3.5.2005, at 4:33, Stephen J McIntosh wrote:
Has anyone got an sample code (Objective C) that can show how to
catch a menu item selected with the Option key is held down?
First of all, do you really have to use the ugly way of hiding
features? Might be reasonable for buttons where the space is lacking
(like the new text find panel), but is *very* bad in menus.
Anyway -- there might be even better way for menus (directly tied up
to their title switching, I kind of recall I've seen somewhere some
documentation of the thing being actually different menu items --
with different actions or tags or wahtever -- switched just visually,
but perhaps my memory plays tricks on me), but the old mantra of
[[NSApp currentEvent] modifierFlags]&NSAlternateKeyMask should work
all right.
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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