Modifying the array of an NSArrayController
Modifying the array of an NSArrayController
- Subject: Modifying the array of an NSArrayController
- From: René Puls <email@hidden>
- Date: Thu, 6 Nov 2003 15:57:58 +0100
Hello all,
I am still trying to understand some basic concepts of the new
controller layer.
If I set an NSMutableArray as the content of an NSArrayController, can
I still make changes to this array and rely on the controller to notice
them? I just wrote a sample program which did this, and the controller
would not notice any added objects (by updating the associated views)
until I called [arrayController rearrangeObjects].
Is this the wrong way to do it? Do I have to use the controller's own
addObject: method for this? I thought the point of the controller layer
was to update the view more or less automatically when the something in
the model is changed. The NSArrayController seems to create its own
array if I don't use setContent:, but I would prefer to "own" the array
myself and keep controller and model separated.
Kind regards,
Rene Puls
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.