NSSlider maxValue not reached.
NSSlider maxValue not reached.
- Subject: NSSlider maxValue not reached.
- From: "Olivier D." <email@hidden>
- Date: Sun, 31 Jul 2005 01:58:51 +0200
Hi,
I'm learning Cocoa and I found something strange with the NSSlider. I
wrote a very simple example with a slider and a label. The label shows
the value of the slider in real time (outlet / action / controller,
simple MVC with no bindings).
There is no problem with the horizontal and vertical sliders: both go
from 0 to 100 and the correct value is shown in the label. The
behaviour is still good with the floatValue of the sliders: from 0.0
to 100.0.
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).
Is this glitch caused by the floating point specifications (IEEE754?)
or the limitations of the precision in the CPU? But in this case, why
do the horizontal and vertical sliders show the correct value: 100 and
100.0?
Thanks.
_______________________________________________
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