We Recommend

Programming in Objective-C Programming in Objective-C
Programming in Objective-C is a concise, carefully written tutorial on the basics of Objective-C and object-oriented programming. The book makes no assumption about prior experience with object-oriented programming languages or with the C language (upon which Objective-C is based). And because of this, both novice and experienced programmers alike can use this book to quickly and effectively learn the fundamentals of Objective-C.


Posted By

zingo on 08/09/07


Tagged

cocoa debug coredata osx objc NSLog managedObjectContext moc


Versions (?)


NSLog with NSError and NSArray with managedObjectContext


Published in: Objective C 


URL: http://www.cocoabuilder.com/archive/message/cocoa/2007/5/4/182843

Prints content from an NSError or NSArray content from a managedObjectContext.

  1. NSError *errord;
  2. NSArray *array = [managedObjectContext executeFetchRequest:request
  3. error:&errord];
  4. if (!array) {
  5. NSLog(@"Error: %@", errord);
  6. return;
  7. }
  8. NSLog(@"Count of managedObjectContext: %d\n%@", [array count], array);

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: zingo on August 9, 2007

have a look at http://snipplr.com/view/97/

You need to login to post a comment.