KVO on NSSlider not observing

2008-12-12 Thread Aaron Wallis
Hi there, I'm having issues setting up bindings via code (rather than in IB) I've got a NSObject subclass which is being used as the controller, and a NSView subclass which has a few controls like NSSliders. In the NSObject I have the following code: - (void)setupSliders {

Re: KVO on NSSlider not observing

2008-12-12 Thread Keith Duncan
Aaron, You wouldn't typically observe a view class. In this case what your problem is that NSSlider doesn't change it's internal value in a key value observing compliant manner. You should observe the underlying value that the slider represents in your controller. If you're using

Re: KVO on NSSlider not observing

2008-12-12 Thread Graham Cox
On 12 Dec 2008, at 11:36 pm, Aaron Wallis wrote: Hi there, I'm having issues setting up bindings via code (rather than in IB) I've got a NSObject subclass which is being used as the controller, and a NSView subclass which has a few controls like NSSliders. In the NSObject I have the

Re: KVO on NSSlider not observing

2008-12-12 Thread Aaron Wallis
Thanks for the help Graham and Keith. Usually I'd just use bindings in IB, but this is the first time i've had to build the interface through code. There's always something to learn it seems :D - Az On 13/12/2008, at 12:12 AM, Graham Cox wrote: On 12 Dec 2008, at 11:36 pm, Aaron Wallis

Re: KVO on NSSlider not observing

2008-12-12 Thread Kyle Sluder
On Fri, Dec 12, 2008 at 8:20 AM, Aaron Wallis d2k...@gmail.com wrote: Usually I'd just use bindings in IB, but this is the first time i've had to build the interface through code. When you set up bindings in IB, you bind the view to the controller. So, you should do the same from code. Send

Re: KVO on NSSlider not observing

2008-12-12 Thread Quincey Morris
On Dec 12, 2008, at 04:36, Aaron Wallis wrote: I'm having issues setting up bindings via code (rather than in IB) I've got a NSObject subclass which is being used as the controller, and a NSView subclass which has a few controls like NSSliders. In the NSObject I have the following code: -