In Cocoa Design Patterns, Chap 29 re-creates, from scratch, an NSArrayController, dissecting in great detail how it works. The example essentially is a very rudimentary drawing program, which shows rectangles in a view, with a table showing the coordinates of the same.
My question relates to the essence of the demo, viz the array of the model objects, specifically an NSArray in the controller. The approach taken is that as each model object is created, it is not added to the array, but a new array is formed with each new model object created, and assigned to the NSArray. So, why would one not simply use an NSMutableArray and simple add or delete model objects. I suspect part of the answer is that assigning a new array allows easier use of KVC but I am not sure as this is not specifically explained. Thanks for your input. _______________________________________________ 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