• 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: Getting modifierFlags during menu action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting modifierFlags during menu action


  • Subject: Re: Getting modifierFlags during menu action
  • From: Ron Fleckner <email@hidden>
  • Date: Sun, 15 Jul 2007 20:50:24 +1000


On 15/07/2007, at 7:18 PM, Uli Kusterer wrote:

On 15.07.2007, at 10:49, Ron Fleckner wrote:
I'm making a class which adds a script menu to a Cocoa app. It works well, but now I want to add functionality similar to other script menus where if you hold down the Option key, the script will open in the user's script editor rather than run itself. I can't figure out how to get modifierFlags for the menu event/action.

I've looked in the archives, but no luck. Any pointers greatly appreciated.

Have you tried [[NSApp currentEvent] modifierFlags] ?

Cheers,
-- M. Uli Kusterer
http://www.zathras.de



Well, thanks very much, Uli. Works beautifully. Not sure why I couldn't find that out myself, but there ya go.


Ron.
_______________________________________________

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


References: 
 >Getting modifierFlags during menu action (From: Ron Fleckner <email@hidden>)
 >Re: Getting modifierFlags during menu action (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: Getting modifierFlags during menu action
  • Next by Date: NSApp's run method and menus...
  • Previous by thread: Re: Getting modifierFlags during menu action
  • Next by thread: NSApp's run method and menus...
  • Index(es):
    • Date
    • Thread