@jeremydouglass Thanks for your comments with regard to the two issues you raised.
-
The decimal field is in fact a text field which validates the input against either an integer or a float range provided by the user. The control uses the Float.parseFloat(String)
method to create a float
value from the input. So although the float data type only has 6-7 significant digits the method will convert any valid decimal value no matter how many significant digits it might have, slight loss of accuracy but what the heck.
-
I was unable to repeat this either in Processing or Eclipse and it is hard to see how it comes about because the spinner checks the mouse event generated by Processing.
Having said that I have looked at the source code and it highlights something interesting. Here is the code
case MouseEvent.WHEEL:
if(currSpot == 1){
if(focusIsWith == this)
loseFocus(parent);
if(event.getCount() * G4P.wheelForSpinner > 0)
inc();
else
dec();
}
since G4P.wheelForSpinner
can only have values -1 or 1 can you spot the logic error.
I assumed that getCount()
will always return a non-zero value for a wheel event.
So either your mouseWheel suddenly changed direction under its own volition (unlikely unless you believe in the paranormal
) or Processing is generating wheel events where getCount()
returns zero (why???). Just goes to show how assumptions can be very wrong.
The fix is easy enough and will be implemented before release.