another responder chain docs bug (validateUserInterfaceItem:)
another responder chain docs bug (validateUserInterfaceItem:)
- Subject: another responder chain docs bug (validateUserInterfaceItem:)
- From: Andy Lee <email@hidden>
- Date: Mon, 25 Jan 2010 18:31:30 -0500
Semi-related to my previous post, I just filed rdar://7577360 (text below). As far as I can tell, it's a bug in the docs.
--Andy
The "Overview" at <http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSUserInterfaceValidations_Protocol/Reference/Reference.html> says: "To validate a control, the application calls validateUserInterfaceItem: for each item in the responder chain, starting with the first responder. If no responder returns YES, the item is disabled."
>From my experience, this is not what happens. Rather, it works the way Jakob Olesen describes in this post on cocoa-dev:
<http://www.cocoabuilder.com/archive/cocoa/168662-validateuserinterfaceitem-and-chaining-actions.html>
"1. Find the target for my action
2. Validate using that target and nobody else."
I.e., validateUserInterfaceItem: does not go up the responder chain until it gets a YES answer; it goes up the responder chain until it finds a target that responds to the action message, meaning the docs are incorrect.
_______________________________________________
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