To help bind my data model to AppKit tables, I’ve written a custom class that 
implements KVC collection accessors to define a mutable-array property. That 
is, it implements methods like -countOfEntries, objectInEntriesAtIndex:, 
insertObject:inEntriesAtIndex, etc. I can then bind this as the contentArray 
property of an NSArrayController, and use that controller to drive a table view 
and master-detail UI.

I’d like to avoid using a separate class, though (so I can make this setup more 
easily reusable.) Is it feasible to subclass NSArrayController and put the 
collection access methods in the subclass? Then I’d just have an 
“EntryArrayController” class I could drop into my nib. From the docs I can’t 
figure out whether this is an appropriate thing to do.

—Jens (still mildly confused by bindings after all these years :-p)

_______________________________________________

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