> I did the first 7 chapters of "More iPhone 3 Development, tackling iPhone 
> SDK3" from Apress regarding the use of CoreData. In these 7 chapters a lot is 
> explained and finally a series of classes and categories are being build that 
> one can use as a Generic Controller for editing data stored in CoreData.
> 
> So I bult a new application where I inserted these classes, and created a new 
> viewController for my specific needs. Almost everything works, except that 
> the tableView is not updated when I create a new item for in the DB, The item 
> is however created, but only visible if I quit the App and start it again. 
> Apparently something is not right.
> 
> I double checked the 4 NSFetechedResult delegates, but it just does not work. 
> I tried to insert [self.tableView reloadData] on a number of places, but to 
> no avail.

Have you tried starting a new project from the template ?  That produces a 
completely functional Core Data application you can experiment with.  I'm not 
familiar with the book, it's possible there's a bug in their sample code.

If you're having problems with the NSFetchedResultsController, please note that 
the cache is *persistent* across application runs.  The NSFetchRequest is a 
read only property.  You should not mutate it.  If you change the 
NSFetchRequest, NSPredicate (or the varargs), or NSSortDescriptor in any way, 
the cache will be invalid.  In 3.1, this kinda usually worked anyway.  In 3.2 
and later, the caching is more aggressive and produces much faster launch times 
for FRC with complex string queries.  This also means that buggy code that got 
away with it on 3.1 will no longer if it's recompiled against the 3.2 SDK (3.1 
binaries still run fine)

You may find the behavior more intuitive if you opt out with a nil cache name.

- Ben

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to