Observing change of selection
Observing change of selection
- Subject: Observing change of selection
- From: Bob Peterson <email@hidden>
- Date: Wed, 26 Jan 2005 19:16:46 -0500
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