• 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: Detecting the Option key on selecting a menuitem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Detecting the Option key on selecting a menuitem
      • From: Prachi Gauriar <email@hidden>
References: 
 >Detecting the Option key on selecting a menuitem (From: Stephen J McIntosh <email@hidden>)

  • Prev by Date: Re: Programatically adding small checkboxes
  • Next by Date: Re: Headless Cocoa/Java app - autorelease
  • Previous by thread: Detecting the Option key on selecting a menuitem
  • Next by thread: Re: Detecting the Option key on selecting a menuitem
  • Index(es):
    • Date
    • Thread