On Tuesday, March 25, 2003, at 11:24 pm, David Ayers wrote:
Hello Richard,
Setting up the (still uncommited) tests for GDL2 I noticed that the
search order for ivars differs from what WO4.5 does. I take it that
OS X takeValue:forKey: should first check the actual key as an ivar
before it checks _key.
* Source/NSKeyValueCoding.m ([NSObject -takeValue:forKey:]):
Corrected search order of instance variables.
The documentation says .., 'sets the value directly. For the key
"lastName" this would be _lastName or lastName." which to me implies
that it tries the version with the underscore first. However, a test
program under MacOS-X shows that in fact it tries the version without
the underscore first.
Anyway, the change in the patch would seem to implement MacOS-X
behavior, whatever the documentation may say. It might be a good idea
to add an autogsdoc comment to clarify this (ie document the order
explicitly).