fetchedResultsController objectAtIndexPath: i "Passing argument 1 of objectAtIndexPath: makes pointer from integer without cast

Posted by cocos2dbeginner on Stack Overflow See other posts from Stack Overflow or by cocos2dbeginner
Published on 2010-12-31T11:40:27Z Indexed on 2010/12/31 11:54 UTC
Read the original article Hit count: 190

Filed under:
|
NSMutableDictionary* dict = [[NSMutableDictionary alloc] init];
 id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:0];

 for (int i; i<[sectionInfo numberOfObjects]; i++) {
  NSManagedObject *o = [self.fetchedResultsController objectAtIndexPath:i];
  [dict setObject:[[o valueForKey:@"frontCard"] description] forKey:@"frontCard"];
  [dict setObject:[[o valueForKey:@"flipCard"] description] forKey:@"flipCard"];
 }

In this line

NSManagedObject *o = [self.fetchedResultsController objectAtIndexPath:i];

i get this warning:

warning: passing argument 1 of 'objectAtIndexPath:' makes pointer from integer without a cast

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c