Hi,
I noticed that when I define a NSStepper with a wide range (e.g. 1000)
and a float increment of 0.1, after a dozen of "increments" things go
adrift with a rounding error.. eg 5.10000001 instead of 5.1
I have tested on Mac 10.5 and PPC and get different errors (e.g.
5.099999998) but the problem is the same, it is nto a GS bug, but
probably a problem on how the internals are handled.
What solution is possible? I have both a textfield and a stepper that
should interact.
I was thinking of just getting the "action" of the Stepper and then
keeping a variable of mine with, eventually a different precision or
that does other rounding tricks.
However, how can I know if increment or decrement have been clicked? Is
there a trick? can I reliably put an action on the two arrows but action
was desired by the user?
A really crude workaround would be to use just a very high number in the
stepper, integer values and not-wrapping and thus compating old and new
value to know if "+" or "-" were the choice, but looks pretty much a hack.
Thanks - Riccardo
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep