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

Re: Control key


  • Subject: Re: Control key
  • From: David Remahl <email@hidden>
  • Date: Sun, 1 Jul 2001 23:35:04 +0200

Nope, that doesn't work...[NSApp currentEvent] returns nil, probably as a consequence of it being a dockling and docklingserver not being a cocoa app (at least not a "real" one)...Anyway, I went the carbon way and now I'm done with this damned dockling. I'll ship it and move on to other more interesting areas...Thanks for your help!

/ david

The Cocoa way to do that is to get the current event, because your menu action come from an event that is accessible from the NSApp object or the window:

NSEvent * last = [NSApp currentEvent];
if ([last modifierFlags] & NSAlternateKeyMask)
return self;
else
return [super hitTest:aPoint];

Voila...

Girard


References: 
 >Re: Control key (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: QuickTime callbacks
  • Next by Date: Re: QuickTime callbacks
  • Previous by thread: Re: Control key
  • Next by thread: Re: Control key
  • Index(es):
    • Date
    • Thread