Re: Core Data / Bindings problem: context not notified of add: ?
Re: Core Data / Bindings problem: context not notified of add: ?
- Subject: Re: Core Data / Bindings problem: context not notified of add: ?
- From: Quincey Morris <email@hidden>
- Date: Wed, 18 Jun 2008 10:05:31 -0700
On Jun 18, 2008, at 03:31, Alain Schartz wrote:
My model consists of an abstract entity A and an entity B, with A
being B's parent. Each entity is managed by it's own
NSArrayController (mode set to Entity and correctly bound to the
context), and each NSArrayController is bound to a NSTableView to
show me what is going on.
Now When I create a B object (using it's NSArrayController's add:
function), it shows up correctly in the according table view but
*sometimes* - impossible to say exactly when or how often - the
corresponding A object does NOT show up. It does so ONLY when I move
the mouse in either one of the views. How strange is that!
You're going to have to clarify your question before anyone can give
you an answer. Array controllers in entity mode don't manage entities,
they are bound to content sets that contain managed objects. What
content sets are the array controllers bound to?
If A is an abstract parent entity (i.e. the Core Data equivalent of an
abstract superclass), there cannot be any actual A objects. If B is
the only sub-entity of A you defined, everything must be a B object,
so it's unclear what the A array controller is supposed to be observing.
It sounds like the content set to which the A controller is bound is
simply not being maintained in a KVO-compliant way. That could explain
the odd behavior you are seeing.
_______________________________________________
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