Re: Table views with different NSArrayControllers sharing the same data object...
Re: Table views with different NSArrayControllers sharing the same data object...
- Subject: Re: Table views with different NSArrayControllers sharing the same data object...
- From: Quincey Morris <email@hidden>
- Date: Thu, 28 Feb 2008 13:08:00 -0800
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@hidden)
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:
This email sent to email@hidden