• 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: NSResponder / acceptsFirstResponder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSResponder / acceptsFirstResponder


  • Subject: Re: NSResponder / acceptsFirstResponder
  • From: Eric Gorr <email@hidden>
  • Date: Sat, 13 Mar 2010 09:16:09 -0500

On Mar 12, 2010, at 1:17 PM, David Blanton wrote:

> How does one get a views acceptsFirstResponder method called without having to click on the view?

You may be looking for -makeFirstResponder: in the NSWindow class.

-acceptsFirstResponder should be called automatically...

If not, you'll need to provide more details on what you are trying to accomplish.

> If a class subclasses NSResponder so it can get events how does one get an instance of this class in the responder chain?

You can use -setNextResponder: in the NSResponder class to modify the responder chain and insert your own stuff.

I would suggest reading the Cocoa Event-Handling Guide ( http://bit.ly/9hx11x ). There is a lot of good, important stuff in there, including stuff on the responder chain.

I might also suggest picking up a copy of

Cocoa Design Patterns (Paperback)
~ Erik M. Buck
• ISBN-10: 0321535022
• ISBN-13: 978-0321535023

There is a chapter in this book on the responder chain and, basically, everything else in the book is stuff you're going to want to know.






_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSResponder / acceptsFirstResponder (From: David Blanton <email@hidden>)

  • Prev by Date: Re: Private ivars, not marked as IBOutlet, visible in IB
  • Next by Date: Re: Private ivars, not marked as IBOutlet, visible in IB
  • Previous by thread: Re: NSResponder / acceptsFirstResponder
  • Next by thread: Which iPhone Program?
  • Index(es):
    • Date
    • Thread