Re: Observing change of selection
Re: Observing change of selection
- Subject: Re: Observing change of selection
- From: Guy English <email@hidden>
- Date: Thu, 27 Jan 2005 18:36:44 -0500
The simplest way is to just be 'old-fashioned' about it. Make your
Controller object a delegate of the table view in question and
implement the (void)tableViewSelectionDidChange method. Just because
you're using bindings doesn't mean that the table view won't talk to
it's delegate anymore.
Hope that helps,
Guy
On Wed, 26 Jan 2005 19:16:46 -0500, Bob Peterson
<email@hidden> wrote:
> I have tried a couple ways to know when the selection has changed in my
> NSArrayController. Since view-to-controller bindings know when this
> happens, I'd like to know how I can write some custom code know when
> the selection changes.
>
> What I want to do is change the number of ticks marks on an NSSlider
> based on the current selection. Each object in the array can have a
> different number of ticks. NSSlider doesn't make the numberOfTickMarks
> property bindable (according to Interface Builder and the bindings doc,
> so I need to write some code.
>
> I've tried extending all of the NSArrayController and
> NSObjectController methods that change the selection. I've tried
> registering an observer for various selection keys using
> addObserver:forKeyPath:options:context:.
>
> Y'all have never failed me yet, so thanks in advance.
> \bob
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden