[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: RFR: 8242553: IntegerSpinner and DoubleSpinner do not wrap around values correctly in some cases
From:       Kevin Rushforth <kcr () openjdk ! org>
Date:       2024-03-30 17:46:37
Message-ID: FZdZcfCAnNo2AFRV-tOPUa263o73lI6WzN8fkCQ2bwU=.fd3b83b4-6e87-4c4d-97b7-47b41ee1904d () github ! com
[Download RAW message or body]

On Sun, 24 Mar 2024 15:11:16 GMT, drmarmac <duke@openjdk.org> wrote:

> This PR should fix the issue and cover all relevant cases with new tests.
> 
> Note: This involves a small behavior change, as can be seen in \
> dblSpinner_testWrapAround_decrement_twoSteps() in SpinnerTest.java:749. With this \
> change the wraparound behavior is similar to that of the IntegerSpinner.

1 seems arbitrary and wrong.
2 isn't much better, since the "+1" is arbitrary for a double spinner.

Neither of the above options make any sense for the sort of things you would use a \
wrap-around double spinner for. So that leaves 3 and 4. I was leaning towards \
recommending something like 4 even before you posted it, and the more I think about \
it, the more it seems like the best option to me.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1431#issuecomment-2028364934


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic