Re: NSResponder / acceptsFirstResponder
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