Re: Why click to knob of NSSlider changes it's value?
Re: Why click to knob of NSSlider changes it's value?
- Subject: Re: Why click to knob of NSSlider changes it's value?
- From: Matt Neuburg <email@hidden>
- Date: Sun, 29 Apr 2007 17:37:36 -0700
- Thread-topic: Why click to knob of NSSlider changes it's value?
On Sat, 28 Apr 2007 21:37:16 -0700, Andrey Tverdokhleb <email@hidden>
said:
>May be this is a stupid problem, but I just can't find a solution and
>hope somebody here knows what to do.
>I have a simple NSSlider, min: -40, max: 60, 11 ticks, continuos, no
>sticking to ticks. Starting value is 0.
>When I click knob of the slider for the first time it sends value
>-0.81081032752990723 through bindings. When I click it again it
>doesn't do this. If I change it's value to 0 programatically and
>click the knob again it sends -0.81081032752990723 again. What I
>don't understand why it's changing value on simple click considering
>that sticking to ticks is disabled. I tried to change amount of ticks
>- doesn't affect anything. Changing range changes that number, but
>the range has to be (-40; 60).
If you change the physical length of the slider you'll get a different
number. Also you'll see the same phenomenon for any initial value (not just
0). Presumably this behavior has to do with the interface resolution: the
physical interface isn't capable of the degree of precision you're
expecting. If this is troublesome, it could be a reason for turning on
"sticking to ticks". On the other hand, since -0.81... is as near as the
user is going to be able to move the slider to zero anyway, why not just
accept this value? m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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