• 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: NSView subclass initialFirstResponder questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: generate skeleton
  • Next by Date: Re: Interface Builder question
  • Previous by thread: NSView subclass initialFirstResponder questions
  • Next by thread: generate skeleton
  • Index(es):
    • Date
    • Thread