Re: Determining modifier key state and *end* of menu selection
Re: Determining modifier key state and *end* of menu selection
- Subject: Re: Determining modifier key state and *end* of menu selection
- From: glenn andreas <email@hidden>
- Date: Mon, 10 Jul 2006 20:46:26 -0500
On Jul 10, 2006, at 7:54 PM, Mark Alldritt wrote:
Hi All,
I'm trying to reliably determine the state of the keyboard
modifiers (option
key) at the end of a menu selection. The event returned by [NSApp
currentEvent] seems to represent the event that initiates the menu
selection. I need to get at the mouseUp event that concludes the menu
selection so that I don't miss the possibility that the user
changed their
mind during the menu selection.
How should I do this?
The easiest way is to make multiple menu items (each with different
actions) and use the "treat as an alternate to the previous item"
checkbox. That way the system will track all of this for you, you
can dynamically change the item text to reflect the different
modifiers, and it'll just call the correct action at the end (so you
don't have to try to figure it out at all)...
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets
_______________________________________________
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