• 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
Re: objectForKey
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: objectForKey


  • Subject: Re: objectForKey
  • From: Scott Stevenson <email@hidden>
  • Date: Fri, 15 Oct 2004 16:15:48 -0700


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]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >objectForKey (From: Martha Espinosa <email@hidden>)

  • Prev by Date: Re: how to do the date control (found in Carbon) in Cocoa?
  • Next by Date: Re: how to do the date control (found in Carbon) in Cocoa?
  • Previous by thread: Re: objectForKey
  • Next by thread: Obtaining port from NSSocketPort
  • Index(es):
    • Date
    • Thread