On Feb 28, 2008, at 12:19, Keith Blount wrote:

I have a feeling I'm approaching this all wrong, given that now I'm trying to bind my DataList object's -backgroundColor to the view's backgroundColor so that changes to the background colour in one view will automatically update in the other, but this doesn't work at all (the model object's accessors never get called).

Well, if fate was kind, then binding the DataListView's backgroundColor to dataList.backgroundColor (instead of the other way around) should solve the problem. (The color well should also be bound to dataList.backgroundColor.)

But apparently fate is not kind, since I don't see that NSTableView exposes 'backgroundColor' as a binding. It looks fairly easy to do (exposeBinding in your subclass and bindToObject: somewhere, possibly in your subclass) though I've never tried it. Or use [dataList.backgroundColor addObserver: self ...] in the DataListView and bypass bindings for this one property.


_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [EMAIL PROTECTED]

Reply via email to