Skip navigation.
 
mlRe: objectForKey
FROM : Scott Stevenson
DATE : Sat Oct 16 01:15:48 2004

On Oct 15, 2004, at 8:41 AM, Martha Espinosa wrote:

> How do I just grab one of the items from within this dictionary for
> every item?  I tried using [software objectForKey:@"install"] without
> success...
>
>         int i, count;
>         count = [software count];
>         for (i = 0; i < count; i++)
>              {
>                        NSString *item=[software objectAtIndex:i];
>                       NSLog (@"Item %d: %@", i, item);
>                 }
>
> any help will be appreciated.


If you can target Panther/10.3, you can use this:

--------------
- (id)valueForKey:(NSString *)key

Returns an array containing the results of invoking valueForKey: using
key on each of the receiver's objects. The returned array will contain
NSNull elements for each object that returns nil.
--------------


    - Scott


--
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]

Related mailsAuthorDate
mlobjectForKey Martha Espinosa Oct 15, 17:41
mlRe: objectForKey stephane sudre Oct 15, 17:47
mlRe: objectForKey Dustin Voss Oct 15, 21:30
mlRe: objectForKey Scott Stevenson Oct 16, 01:15