• 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: makeKeyAndOrderFront and NSBorderlessWindowMask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >makeKeyAndOrderFront and NSBorderlessWindowMask (From: Jorge Arroyo <email@hidden>)

  • Prev by Date: Problem with NSSortDescriptor sorting NSMutableArray?
  • Next by Date: NSRunAlertPanel-not working?
  • Previous by thread: Re: makeKeyAndOrderFront and NSBorderlessWindowMask
  • Next by thread: Re: makeKeyAndOrderFront and NSBorderlessWindowMask
  • Index(es):
    • Date
    • Thread