Re: makeKeyAndOrderFront and NSBorderlessWindowMask
Re: makeKeyAndOrderFront and NSBorderlessWindowMask
- Subject: Re: makeKeyAndOrderFront and NSBorderlessWindowMask
- From: Ryan Bates <email@hidden>
- Date: Mon, 16 Feb 2004 18:41:34 -0800
Normally, a borderless window can't accept key events. You need to
create a subclass of NSWindow and declare:
- (BOOL)canBecomeKeyWindow
{
return YES;
}
As an alternative you could create your own run loop and process the
events manually. I suggest this if you are creating a game or something
similar.
Ryan
On Feb 16, 2004, at 3:47 PM, Jorge Arroyo wrote:
Hello,
I'm having a bit of trouble trying to get keyboard events into a
NSBorderlessWindowMask window. I've subclassed NSWindow to override the
canBecomeKeyWindow method. I call makeKeyAndOrderFront at the end of
the applicationDidFinishLaunching function. All I get when I run the
app and press a key is a beep.
I realize this has been discussed, but I haven't found a solution
looking through the archives...
Thanks,
BTW, I got the code for the full screen app from this article:
http://cocoadevcentral.com/articles/000028.php
-Jorge
_______________________________________________
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.
_______________________________________________
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.