Re: Listening for changes in a table
Re: Listening for changes in a table
- Subject: Re: Listening for changes in a table
- From: Chris Idou <email@hidden>
- Date: Thu, 18 Sep 2008 20:27:00 -0700 (PDT)
--- On Thu, 9/18/08, Ken Thomases <email@hidden> wrote:
> Two possibilities:
>
> * If you used a custom class rather than a dictionary, then
> there
> would be a setter of your own design called when the
> property is set
> due to a change in the checkbox.
Yes I could do that, but given that I'm storing the result in the user preferences, and the user preferences can store dictionaries but not objects, I was hoping to stay with dictionaries.
Maybe I should try inheriting from NSMutableDictionary or something.
> * Your controller can use KVO to observe the property to
> which the
> checkbox is bound. Then it will receive change
> notifications when the
> property is changed.
Would that mean observing every single dictionary in the array and adding and removing observers as the array expands and contracts? Sounds fiddly.
--- On Thu, 9/18/08, I. Savant <email@hidden> wrote:
> Why does everybody forget about / ignore
> <NSTableDataSource>?
I'm a bit vague on how a DataSource and an ArrayController work together. Do you choose one or the other? In any case, it sounds like a fairly fiddly option too.
_______________________________________________
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