Re: NSTableView, NSArrayController, NSManagedObjectContext
Re: NSTableView, NSArrayController, NSManagedObjectContext
- Subject: Re: NSTableView, NSArrayController, NSManagedObjectContext
- From: mmalc crawford <email@hidden>
- Date: Tue, 1 Jan 2008 10:49:40 -0800
On Jan 1, 2008, at 10:34 AM, Ture Pålsson wrote:
Doing so means that the controller tracks inserts into and deletions
from its managed object
context for its entity."
The key word there is "its". You're inserting into another context.
Oh well, assuming that I do need to call refresh: on the
NSArrayController, how does one solve this architecturally?
Exactly as you appear to have already done. Register for change
notifications from the second context and update the array controller
on receipt.
Now, if I need to nudge the NSControllers to make them update
themselves, that means that the
model objects need to know about the controllers.
I'm not sure how that follows? The model objects don't need to know
about the controllers -- controllers know about other controllers.
Managed objects themselves don't need to know...
mmalc
_______________________________________________
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
References: | |
| >NSTableView, NSArrayController, NSManagedObjectContext (From: "Ture Pålsson" <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: mmalc crawford <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: "Ture Pålsson" <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: "I. Savant" <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: "Ture Pålsson" <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: "I. Savant" <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: "Ture Pålsson" <email@hidden>) |