Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Table views with different NSArrayControllers sharing the same data object...




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Table views with different NSArrayControllers sharing the same data object... (From: Keith Blount <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.