Re: Problems with KeyDown events
Re: Problems with KeyDown events
- Subject: Re: Problems with KeyDown events
- From: Angela Brett <email@hidden>
- Date: Sun, 18 Aug 2002 11:00:55 +1200
mainWindow = [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,640,480)
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];
and all necessary initialization according with coco docs to handle
keyDown events, but nothing happens when I press a key.
But if a change NSBorderlessWindowMask with NSTitledWindowMask
everything work just fine.
I think that's a borderless window by default cannot become the key
window. To get around that you can use a subclass of NSWindow which
just changes this one method:
- (BOOL)canBecomeKeyWindow {
return YES;
}
It worked for me... I got that from a tutorial on full-screen windows
somewhere.
--
Angela Brett
email@hidden
http://acronyms.co.nz/angela
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.