Re: NSSlider maxValue not reached.
Re: NSSlider maxValue not reached.
- Subject: Re: NSSlider maxValue not reached.
- From: glenn andreas <email@hidden>
- Date: Sat, 30 Jul 2005 19:12:55 -0500
On Jul 30, 2005, at 6:58 PM, Olivier D. wrote:
Something mysterious happens to the circular version of the slider
(whether it is regular or small): the maxValue (in my example 100) is
skipped and never reached. It either goes from 99 to 0 (if I ask for
the intValue of the slider) or from 99.99... to 0.0 (if I ask for the
floatValue).
The issue is with the circular presentation itself. Consider a
circle, marked out with degrees, from 0 to 360. You can imagine a
arrow that points from the center to, say, 45 degrees, or 90 degrees,
no problem. Now consider one that points to 0 degrees, and another
that points to 360 degrees. Those two are identical - there is no
way to tell them apart. You can point to 0.0001, or 359.9999, and
those are two different things, but 0 and 360 are identical.
The same happens even if you only go from 0 to 100 - 0 and 100 are
identical, and so (in this case) 0 is picked.
You might say "well, back it off just a bit, so that there is a
difference between 0 and 100". The problem is that if you do that,
there is now a point, half ways between the 0 and the new 100. What
value is that? It can't be less than 0 or more than 100, yet lies
beyond that range, so this approach won't work either.
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets
_______________________________________________
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