Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-12-07 Thread Michael A. Crawford
Well, I don't know if you guys are still listening on this thread but, for the record, I did put Graham's suggestion into practice, immediately. It was fast, easy, and simple to modify when I wanted to tweak the behavior to use float values instead of integers. Thanks, Graham. After g

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Sherm Pendley
On Nov 27, 2008, at 7:24 PM, Graham Cox wrote: Yep, that's a potentially more serious issue. It would be nice if a category had a way to check for an existing implementation and quietly no-op itself. Just checking respondsToSelector: doesn't work of course, always returning YES. Build you

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Bill Bumgarner
On Nov 28, 2008, at 12:19 PM, Graham Cox wrote: On 28 Nov 2008, at 11:46 am, Bill Bumgarner wrote: At best, your app's standard sliders will behave in a decidedly non- standard fashion. At worst, your app's standard sliders will crash. Could you explain how that's a real possibility? I don'

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Michael Ash
On Thu, Nov 27, 2008 at 7:24 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > >> Please don't do this! It will apply to every single slider in your >> process, even ones you didn't create yourself, > > Well, that is potentially a "feature". I guess the point would be to test > your UI thoroughly and mak

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Graham Cox
On 28 Nov 2008, at 12:19 pm, Graham Cox wrote: Even if they couldn't remove the functionality for legacy reasons they could start documenting it in a much more strongly worded fashion to state that this is simply not permitted. Just to emphasise the point, the full paragraph you quoted pa

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Graham Cox
On 28 Nov 2008, at 11:46 am, Bill Bumgarner wrote: At best, your app's standard sliders will behave in a decidedly non- standard fashion. At worst, your app's standard sliders will crash. Could you explain how that's a real possibility? I don't see that. If Apple's implementation of -scro

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Bill Bumgarner
On Nov 28, 2008, at 11:52 AM, Graham Cox wrote: In which case Apple should a) explicitly document this as a no-no, and b) disallow categories to install methods that already exist. I would have thought b) was possible, as when loading a category, I assume what's really happening is that the

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Graham Cox
On 28 Nov 2008, at 11:46 am, Bill Bumgarner wrote: Categories are great for dividing a class's implementation (sometimes across frameworks -- NSAttributedString in Foundation and AppKit, for example) and great for adding new functionality to existing classes in isolation. But they are not

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Bill Bumgarner
On Nov 28, 2008, at 11:24 AM, Graham Cox wrote: Playing with this, the code below gives a nice "feel" for a big variety of sliders in my app and wraps properly with circular ones too. I was skeptical at first that this was a good idea but trying it out in the app I've quickly come to appreci

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Graham Cox
On 28 Nov 2008, at 4:08 am, Graham Cox wrote: On 28 Nov 2008, at 3:18 am, Michael A. Crawford wrote: I assume I can sub-class the control but I wondering if there is a better way. I'm using a circular slider and would like it to rotate when I roll the scroll wheel up or down. You can

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Michael Ash
On Thu, Nov 27, 2008 at 12:08 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > > On 28 Nov 2008, at 3:18 am, Michael A. Crawford wrote: > >> I assume I can sub-class the control but I wondering if there is a better >> way. I'm using a circular slider and would like it to rotate when I roll >> the scrol

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Graham Cox
On 28 Nov 2008, at 3:18 am, Michael A. Crawford wrote: I assume I can sub-class the control but I wondering if there is a better way. I'm using a circular slider and would like it to rotate when I roll the scroll wheel up or down. You can just implement the -scrollWheel: method in a cat

What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Michael A. Crawford
I assume I can sub-class the control but I wondering if there is a better way. I'm using a circular slider and would like it to rotate when I roll the scroll wheel up or down. -Michael -- There are two ways of constructing a software design. One way is to make it so sim