On Feb 2, 2009, at 1:28 AM, mmalc Crawford wrote:

On Jan 31, 2009, at 9:35 PM, Phillip Hall wrote:

I then read about the insertObject: in<Key>AtIndex: method. Reading the documentation it seems this should be called by the NSArrayController if its implemented by its content array (in my case AppController).

<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdTroubleshooting.html#//apple_ref/doc/uid/TP40002320-SW24 >

The description of this bug suggests it's specific to Core Data and the contentSet binding. I got the impression from Mr. Hall that he's not using Core Data here, nor the contentSet binding. Does this still apply?

Phillip, did you _only_ implement an insertObject:inVegetablesAtIndex: method, or did you implement the full complement of indexed to-many accessors? See the comment at the declaration of the - mutableArrayValueForKey: method in NSKeyValueCoding.h to see which methods you would have to implement before the indexed to-many accessors would be used. (I'd direct you to the documentation for - mutableArrayValueForKey:, but it isn't as complete as the comment in the header.)

In short, you would need:

-countOfVegetables
At least one of: -objectInVegetablesAtIndex: or -vegetablesAtIndexes:
At least one of: -insertObject:inVegetablesAtIndex: or - insertVegetables:atIndexes: At least one of: -removeObjectFromVegetablesAtIndex: or - removeVegetablesAtIndexes:

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to