Follow-up Comment #4, bug #22565 (project gnustep):
I attached a contrived but concrete example in KVC.zip, which I ran on Mac OS
10.5 and OPENSTEP 4.2 + EOF 2.1. The results are somewhat surprising--EOF 2.1
gives the same results as Cocoa for valueForKeyPath: when a key path is used
with an aggregate operator. I don't have WO4.5 so I can't test that version
of EOF (I could test the WO4 version if I could get Mac OS X Server going
again).
Note that the behavior of valueForKey: appears to be different between EOF
and Cocoa. In EOF, valueForKey: implemented the aggregate operators, but in
Cocoa they appear to be implemented only in valueForKeyPath:.
In Cocoa, @sum.x.y.z appears to mean different things depending on whether it
is interpreted as a key or a key path. The valueForKey: method of NSArray and
NSSet appears to work as documented in NSDictionary with respect to keys
starting with "@" (though I don't see this documented for NSArray and NSSet):
"If key does start with [EMAIL PROTECTED], strips the [EMAIL PROTECTED] and
invokes [super
valueForKey:] with the rest of the key."
(file #15262)
_______________________________________________________
Additional Item Attachment:
File name: KVC.zip Size:42 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?22565>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep