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

Re: Enumerator and


  • Subject: Re: Enumerator and
  • From: Andy Lee <email@hidden>
  • Date: Tue, 9 Apr 2002 12:21:21 -0400

At 6:03 PM +0200 4/9/02, Ondra Cada wrote:
On Tuesday, April 9, 2002, at 05:40 , Onar Vikingstad wrote:
while ( (index = [enumerator nextObject]) ) {
tempObject = [records objectAtIndex:[index intValue]];
[tempString appendString:[[records objectAtIndex:[index intValue]] componentsJoinedByString:@":"]];
}
[...]
I regret to say that I can't make sense of the part

appendString:[... componentsJoinedByString:@":"]

which would make sense only if your array (records) contained nested arrays, whilst it seems to contain some dictionaries (since "[NSCFDictionary intValue]: selector not recognized").

Oops, I assumed the array not only contains dictionaries, but that was in fact Onar's intent. I didn't realize NSDictionary doesn't respond to -componentsJoinedByString:. So the code I posted might need further debugging. If the array is supposed to contain dictionaries, the -componentsJoinedByString: call needs to be replaced. If the array is supposed to contain arrays, there is obviously a bug elsewhere.

--Andy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Enumerator and (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Enumerator and
  • Next by Date: Getting Desktop window
  • Previous by thread: Re: Enumerator and
  • Next by thread: Re: Enumerator and
  • Index(es):
    • Date
    • Thread