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: Fri, 21 Jan 2011 19:47:14 -0800
On 2011 Jan 21, at 18:34, Kenneth Baxter wrote:
> So, completely separate from the UI, I create an array controller in my Node managed object, and set its entity name, MOC etc, and set the fetch predicate to be @"parent = SELF". It should then keep itself updated when the children get added or deleted in the MOC, right? (I have never used array controllers in this way before)
>
> Now this is where I get a bit lost … Sorry for being dumb about this
No, you're not dumb. If Mr. Spock beamed down here from the starship Enterprise, and you gave him the reference documentation and told him to build a user interface for a Core Data app from scratch, he couldn't do it either. There are too many ways to go wrong, too many checkboxes and popups in Interface Builder.
You need to download one of Apple's sample projects or follow one of their tutorials. For Core Data with NSArrayController and NSTableView, there is DepartmentAndEmployees.
One warning though: Some years ago, I heard bad things about Core Data with NSTreeController and NSOutlineView, and for this reason have thus far shunned NSTreeController and stuck with my old-fashioned data source, using change notifications to trigger -reloadData messages. Maybe someone who has successfully used NSTreeController and NSOutlineView with Core Data can suggest a good tutorial or sample project.
_______________________________________________
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