FROM : Kyle Sluder
DATE : Sat Jun 28 22:08:45 2008
On Sat, Jun 28, 2008 at 2:14 PM, Bill Bumgarner <<email_removed>> wrote:
> You want -objectForKey: -valueForKey: is for key value coding,
> -objectForKey: is for extracting objects from a dictionary.
>
> Shouldn't cause a problem.
I thought the collection classes were smart and treated -valueForKey:
by sending each object in the collection -valueForKey: and compiling
the results in an object arranged in the same way as the original.
That way you could have an array of strings and do something like
[myArray valueForKey:@"length"] to get an array of lengths
corresponding to each instance.
--Kyle Sluder
DATE : Sat Jun 28 22:08:45 2008
On Sat, Jun 28, 2008 at 2:14 PM, Bill Bumgarner <<email_removed>> wrote:
> You want -objectForKey: -valueForKey: is for key value coding,
> -objectForKey: is for extracting objects from a dictionary.
>
> Shouldn't cause a problem.
I thought the collection classes were smart and treated -valueForKey:
by sending each object in the collection -valueForKey: and compiling
the results in an object arranged in the same way as the original.
That way you could have an array of strings and do something like
[myArray valueForKey:@"length"] to get an array of lengths
corresponding to each instance.
--Kyle Sluder






Cocoa mail archive

