Hi all
I have a MOC created in my AppDelegate class. I have a MOC property in my RootView which is set by the AppDelegate with something like:
rootView.managedObjectContext = self.managedObjectContext;
This rootView creates at some time a ModalView and sets there a MOC property also by the same way.
Everything works fine. I can create new managed objects, the views can access them and delete them.
Until the point i make a [self.managedObjectContext save:&error]
(in the AppDelegate class when the app moves into background).
After this, if i create a new managed object in the rootView, i can not delete this new object through the modal view with something like: [self.managedObjectContext deleteObject:managedObject]
The app crashes. Sometimes I had an error message in the console like: NSManagedObjectContext cannot delete objects in other contexts.
So it seems that after the save the MOC changes somehow.
What is happening there, what did I miss.
I am using iOS 4.1.
Thx and cheers,
Ben