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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to