Re: Undo in conjunction with core data
Re: Undo in conjunction with core data
- Subject: Re: Undo in conjunction with core data
- From: Jerry Krinock <email@hidden>
- Date: Sun, 23 Jan 2011 11:10:04 -0800
On 2011 Jan 23, at 00:56, Kenneth Baxter wrote:
> However, if I add a child and then undo the addition, the array controller has the child removed, but it is still there in the children, and all its data has gone. It has not been turned into a fault, and is not marked as deleted.
I have managed to create managed objects with nil attributes, for whom -isDeleted returns nil, by re-inserting deleted objects…
http://www.cocoabuilder.com/archive/cocoa/236009-nsmanagedobjectcontext-insertobject-cancels-prior-deletion.html#236009
I still think that you need to deliberate over Delete Rules. I have used managed objects in trees, with a Cascade Delete Rule from parent --> child, and can't remember ever seeing problems like you are having. When I delete a parent, children disappear from the model and the view. Undo and Redo just work.
> That's a scary discussion - I need to pass in my objects to the processing thread so it can read them - I had no idea there would be a problem with doing that. Yet another thing to learn about Core Data.
Only if you insist on accessing a managed object context from multiple threads ;)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden