NSDocument refuses to update core data changes using NSFetchedResultsController

103 views Asked by At

I have a Document Based Core Data Application. Each NSPersistantDocument has its own Managed Object Context.

I can open/create a document and create a Managed Object within fine, but after open/creating a document and then initialising and inserting a managed object within that document, created Managed Objects from any other document are not registered by the NSFetchedResultsController:

I'm sure I'm missing something significant.

I can see I have changes with:

managedObjectContext.hasChanges

And can check they are indeed the objects with:

managedObjectContext.insertedObjects

It looks like NSFetchedResultsController is the problem as when observing NSManagedObjectContextObjectsDidChangeNotification I get notifications for the inserted managed objects, but my NSFetchedResultsController Delegate implementing:

controller:didChangeObject:atIndexPath:forChangeType:newIndexPath:

gets nothing...

I don't suppose anyone has any ideas?

0

There are 0 answers