Re: Core data, array controller, and add:
Re: Core data, array controller, and add:
- Subject: Re: Core data, array controller, and add:
- From: mmalc crawford <email@hidden>
- Date: Wed, 1 Nov 2006 20:01:52 -0800
On Nov 1, 2006, at 1:51 PM, Dale Schack wrote:
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?
This is (unfortunately) due to a (known) bug in NSArrayController; it
does not invoke custom accessor methods.
You can work around this if you can introduce '.self' into the
keypath, for example:
If the contentSet of your detail array controller is bound to
[MasterArrayController].selection.children
then change it to
[MasterArrayController].selection.self.children
mmalc
_______________________________________________
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