Re: Responder-Chain question.
Re: Responder-Chain question.
- Subject: Re: Responder-Chain question.
- From: Matt Neuburg <email@hidden>
- Date: Wed, 14 Sep 2011 11:42:48 -0700
On Wed, 14 Sep 2011 14:01:17 +0300, Motti Shneor <email@hidden> said:
>1. Why Apple says "After the Delegate" when delegate isn't a responder, and is never in the responder chain.
See:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html
See it, but don't believe it without testing. The responder chain has never been very accurately documented by Apple, so testing is always the best way to resolve doubts. For example:
http://lists.apple.com/archives/cocoa-dev/2005/Feb/msg01237.html
At the time I wrote that message, the responder chain was used in two very different ways (nil-targeted events vs. user events such as keyDown: messages), and the framework's idea of what constituted the chain was different in the two cases: one difference was that, as experiment proved, the window delegate was in the first chain but not the second. As you can see from that thread, I encountered some resistance when I pointed this out, but this resistance seemed to be based on the documentation, not on actual testing, which resolved the matter quite clearly (like people who didn't believe Galileo when he said Jupiter had moons).
You'll notice that I'm hedging here and saying what was true at that time, since how do I know (without testing all over again) whether Apple has not changed things behind the scenes in the meantime?
Anyway, the point is that you shouldn't make assumptions about "never"; the window delegate can indeed be in the responder chain, but it might not be in the responder chain you're talking about. :) m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook_______________________________________________
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