Re: Model change behind NSTreeController's back
Re: Model change behind NSTreeController's back
- Subject: Re: Model change behind NSTreeController's back
- From: Sam Stigler <email@hidden>
- Date: Sat, 5 May 2007 05:10:22 -0700
Hi,
From looking at the list archives I know that Chris took a stab at answering
this back in February, so I'll make this brief. (I'm not sure if I completely
understood how his answer applied to my situation.) I'm using an
NSTreeController to update an NSOutlineView with information from a my Core
Data store, in a document-based application. The problem I'm having is that
I'm trying to add new objects to the store using [NSEntityDescription
insertNewObjectForEntityForName:inManagedObjectContext], and I cannot get my
outline view to update. I've tried calling rearrangeObjects on the tree
controller after the add was completed, but that didn't make a difference. I
also tried unchecking "Automatically prepares content" for the tree controller,
but all that did was ensure that none of the objects I'd hard-coded into the
document's windowControllerDidLoadNib: method were visible in the outline view.
Does anyone have any advice on what I could do to remedy this situation? I am
doing the right thing, adding new objects to the Managed Object Context instead
of the tree controller, right? I'd think there has to be some method to force
the tree controller and/or outline view to completely reload, but that could
end up getting expensive. I thought bindings were supposed to take care of
this...
Thanks,
Sam
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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