• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSPersistentDocument Tutorial - Crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Turning NSMenuItem into separator
  • Next by Date: Re: Getting mouseMoved event while dragging
  • Previous by thread: Still can't get auth to work correctly.
  • Next by thread: XML parser for objective C
  • Index(es):
    • Date
    • Thread