Core data, array controller, and add:
Core data, array controller, and add:
- Subject: Core data, array controller, and add:
- From: Dale Schack <email@hidden>
- Date: Wed, 1 Nov 2006 14:51:49 -0700
Hello,
I have a data model that consists of Parent, which has a to-many
relationship with a Child, which has the inverse relationship to Parent.
Each of these objects, Parent and Child, have associated
NSArrayControllers. These controllers are used to set up a typical
Master-Detail relationship. This displays the model data correctly,
and is able to add:/remove: objects to/from the managed object context.
I now want to intercept the point where the newly created Child is
added to its Parent, as I need to update a non-standard attribute
that maintains ordering. I had thought to perform this in the Parent
relationship methods (e.g. addChildObject:)
However, this method is not being called by the default
NSArrayController add: method. Do I need to create a custom
NSArrayController to ensure that addChildObject: is called on the
Parent? Or am I missing something basic here?
Thanks, Dale
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden