Re: NSView subclass initialFirstResponder questions
Re: NSView subclass initialFirstResponder questions
- Subject: Re: NSView subclass initialFirstResponder questions
- From: Brian Webster <email@hidden>
- Date: Mon, 29 Jul 2002 22:22:04 -0500
On Monday, July 29, 2002, at 09:27 PM, cocoa-dev-
email@hidden wrote:
I'm working on an app that has a subclass of NSView that responds to
keyboard input. I set this object as the initialFirstResponder of the
main window of the app. However, when I start up the app, I have to
click in the window, on the NSView subclass, before it will respond to
keyboard input. The docs I have read that this is the way it is
designed to work. I want it to respond to keyboard input from the
get-go, without clicking on it. How can I do this?
In your awakeFromNib, if you have outlets to the window and the
view, do [window makeFirstResponder:view].
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.