• 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: Alternating Button
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alternating Button


  • Subject: Re: Alternating Button
  • From: "douglas a. welton" <email@hidden>
  • Date: Thu, 3 Apr 2008 10:31:06 -0400

Gerriet,

Check out the function GetCurrentEventKeyModifiers() in the Carbon Event Manager reference:

<http://developer.apple.com/documentation/Carbon/Reference/Carbon_Event_Manager_Ref/Reference/reference.html#//apple_ref/doc/uid/TP30000135-DontLinkChapterID_1-DontLinkElementID_20 >

regards,

douglas

On Apr 3, 2008, at 4:44 AM, Gerriet M. Denkmann wrote:

Llistening at NSWindowDidUpdateNotification (or probably better: NSApplicationWillUpdateNotification) is certainly a good idea.
Whenever the modifier keys change (and on several other occasions as well) an NSApplicationWillUpdateNotification gets send.


When I get such a notification I could, as you suggested, "make the appropriate modifications to your button based on the state of the keyboard."

But: how do I get this aforementioned state? [NSApp currentEvent] might be the key-event, but I am not sure I can rely on this. Maybe another event came after this and before the notification gets sent.

I would like to have something like [NSApp currentModifierFlags] (similar to [NSEvent modifierFlags])


Kind regards,

Gerriet.


_______________________________________________

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


  • Follow-Ups:
    • Re: Alternating Button
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >Alternating Button (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Alternating Button (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Alternating Button (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Alternating Button (From: "douglas a. welton" <email@hidden>)
 >Re: Alternating Button (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Cocoa-dev Digest, Vol 5, Issue 533
  • Next by Date: Re: activate my application while dragging on other application window
  • Previous by thread: Re: Alternating Button
  • Next by thread: Re: Alternating Button
  • Index(es):
    • Date
    • Thread