NSPersistentDocument Tutorial - Crash
NSPersistentDocument Tutorial - Crash
- Subject: NSPersistentDocument Tutorial - Crash
- From: email@hidden
- Date: Thu, 29 Sep 2005 23:00:32 -0700
Hi all, almost finished with the coredata NSPersistentDocument
Tutorial and ran into a problem with the
"Cut" method of NSDocument (MyDocument) subclass causing a crash.
This only happens in a certain situation, and the crash is located
deep inside coredata.
It happens when there are many Employees (maybe over 100) who all
have the same
manager (to-one relation) set to the same exact Employee object.
Selecting them all, and then
calling the cut method (ctrl-x) and deleting the objects from the
managedObjectContext
using deleteObject: causes coredata to crash a short time after all
the objects are removed.
Now, letting the array controller remove all the selected objects in
this situation causes no
problem. So my cut method now looks like this:
- (void)cut:(id)sender
{
[self copy:sender];
[employeeController remove:self]; //removes the selection
which we just copied (controller deletes objects)
}
Otherwise the provided apple code causes a crash somewhere when
attempting to post a notification inside coredata...
If anyone has run into this some help would be appreciated.
Thanks,
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden