Greg, Generally these would be called "derived properties" from my experience, and it's possible to add them on the classes that your Entities use, using KVO methods. For instance, if you have 2 genuine properties on your "Person" entity called firstName and lastName then you can create a fullName property on your Person class, and when firstName or lastName change, call -willChangeValueForKey: and -didChangeValueForKey: on "fullName" and then have your -fullName method return a concatenation of the first and last names. This doesn't work as well in your example of Now Playing, since it has less to do with your model itself, but it works fairly well when you have a property derived from other properties on your Entity.
-- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Sun, Sep 6, 2009 at 10:41 AM, Gregory Holden <hold...@gmail.com> wrote: > > NSArrayController seems great if you want to point it at repeating objects, > but I can't find any clear way to add that one-off column that isn't part of > the actual model objects (i.e. The "Now Playing" speaker in itunes, or a > column with row numbers - independent of sorting). > > I've tried a couple things myself, but feel the best thing to do is throw > NSArrayController away in these situations, and stick to the DataSource. > Would this be an accurate assessment? How have others dealt with this > problem? > > I did try setting up the bindings AND a datasource on the same table. It > appears to work, but it also seems very dangerous as I'm obviously still > getting requests for the bound data via tableView:objectValueForTableColumn. > > Thanks > Greg > _______________________________________________ > > 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/steven.degutis%40gmail.com > > This email sent to steven.degu...@gmail.com > _______________________________________________ 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