Re: Control key
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