Re: Getting keyDowns
Re: Getting keyDowns
- Subject: Re: Getting keyDowns
- From: "John C. Randolph" <email@hidden>
- Date: Sun, 26 Aug 2001 13:00:13 -0700
On Sunday, August 26, 2001, at 12:46 PM, Finlay Dobbie wrote:
On Sunday, August 26, 2001, at 08:30 pm, John C. Randolph wrote:
You can get the window's event mask in the debugger with "p (int)
window->_winEventMask". To check if it's taking keydowns, use "p
(int) window->_winEventMask | NSKeyDownMask".
I know that in NeXTSTEP, there was a method to set the window's event
mask, but I can't seem to find it in the 10.0 docs.
I haven't checked, but this should suffice:
@interface NSWindow(EventMaskSetting)
- (void)setEventMask:(int)newEventMask;
@end
@implementation NSWindow(NSEventMaskSetting)
- (void)setEventMask:(int)newEventMask {
_winEventMask = newEventMask;
}
@end
Oh, the joy of categories! :-)
Gee, how would you do that in Java ;-)?
-jcr
[Objc retain];