• 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
another responder chain docs bug (validateUserInterfaceItem:)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: simple file browser
  • Next by Date: Re: Garbage Collection Docs Puzzle
  • Previous by thread: Re: inspecting return data from NSPasteboard propertyListForType:
  • Next by thread: Focus Ring and NSTextField
  • Index(es):
    • Date
    • Thread