I have the following setup

1 custom model class (Vegetable)
1 class (AppController) Has an NSMutableArray (vegetables) property.
1 NSArrayController. Object controller set to Class with Class name set to Vegetable. Content Array is bound to AppController.vegetables

I have a button on my window which is bound to the NSArrayControllers add: action.

Now I want to know the different ways to know when the an object is added to the vegetables array via the NSArrayControllers add: action.

First i Iooked registering an observer on the AppControllers key path "vegetable". This worked fine.

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).

I have implemented the method, but it does not get called. I obviously have the wrong end of the stick on how insertObject: in<Key>AtIndex: is supposed to be used.

Can anyone see where I have gone wrong?

Thanks -

Phillip Hall
_______________________________________________

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