FROM : mmalc crawford
DATE : Tue Jan 01 19:49:40 2008
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
DATE : Tue Jan 01 19:49:40 2008
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 mail archive

