Hi all,

I have a very common UI layout: a Master/Detail view. The Master is a 
NSTableView bound via a NSArrayController to a NSMutableArray, with buttons for 
Add and Remove whose Target/Action is the NSArrayController's add and remove 
actions. The Detail box displays attributes of the NSArrayController's current 
selection. Like I said, a pretty common setup.

I want to intercept the "add" action to fill in default information for the 
newly added item. I can't do this in the model's initializer because each 
item's default information will be computed based on all the prior information 
in the NSMutableArray. It belongs in the controller and not in the model. Is 
this an appropriate time to subclass NSArrayController? Is there a more elegant 
way to do it? Most of what I have read about subclassing says that you 
shouldn't do it. :)

Thanks,
Soong



      
_______________________________________________

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