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

Enumerator and


  • Subject: Enumerator and
  • From: Onar Vikingstad <email@hidden>
  • Date: Tue, 9 Apr 2002 17:40:10 +0200

I'm trying to do something that's seeminly easy: to "convert" an array (records) into a special formatted string (I chose to use enumerator and while function to have full control). But I keep getting run errors when this action (doit) is executed:

[NSCFDictionary intValue]: selector not recognized
[NSCFDictionary intValue]: selector not recognized

Here's my little snippet of code:

- (IBAction)doit:(id)sender
{
NSEnumerator* enumerator = [records objectEnumerator];
NSMutableString *tempString = [NSMutableString stringWithCapacity:4];
id tempObject,index;

while ( (index = [enumerator nextObject]) ) {
tempObject = [records objectAtIndex:[index intValue]];
[tempString appendString:[[records objectAtIndex:[index intValue]] componentsJoinedByString:@":"]];
}

NSLog(@"Array: %@", [tempString self]);
}



Kind regards,
Onar Vikingstad
_______________________________________________
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.

  • Follow-Ups:
    • Re: Enumerator and
      • From: Andy Lee <email@hidden>
    • Re: Enumerator and
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: ObjC and C++
  • Next by Date: Re: ObjC and C++
  • Previous by thread: Re: Finding topmost window of a certain type
  • Next by thread: Re: Enumerator and
  • Index(es):
    • Date
    • Thread