Don't allow negative values in the general option pane.
| Submitted | thomasmey - 2012-12-28 - 10:39:12z | Assigned | thomasmey |
|---|---|---|---|
| Priority | 5 | Category | None |
| Status | Open | Group | None |
| Resolution | Accepted | Visibility | No |
| 2013-01-05 - 17:46:27z ezust |
This UI consistent with the other numeric input field on that page, so it is accepted.
You can commit directly. The try/catch should be unnecessary though, since the numeric input field restricts input. but I wonder why people aren't using an editable spinbox instead for numeric inputs - then you can set a min and a max value for it and you don't have to check for invalid input at all. |
|---|---|
| 2013-03-16 - 09:39:33z thomasmey |
New version of the patch attached. This one uses JSpinner component for the number values. Please check the min and max values. are 0 and Integer.MAX sane values for both elements? |
| 2013-04-15 - 17:28:03z ezust |
This patch depends on java7. Which might be ok, I just want to confirm that we are
officially requiring java7 in jEdit 5.1. |
| 2013-04-17 - 17:35:02z ezust |
please update your patch to work against java 1.6. |
| 2013-04-17 - 17:49:46z ezust |
Ignore previous comment. Testing your patch now, I see that when the user hits enter,
it is not actually consumed by this spinbox and instead registers as an "ok" in the
option dialog. There was a similar issue with all comboboxes which was fixed. I will
investigate how to fix it for these spinboxes too. |
| 2013-04-17 - 17:52:00z ezust |
It seems handling of enter key is consistent with other numeric input fields from other panes, so this is accepted. |
| 2012-12-28 - 10:39:13z thomasmey |
GeneralOptionPane-Fix-negative-values.patch v1 |
|---|---|
| 2013-03-16 - 09:46:15z thomasmey |
GeneralOptionPane-Fix-negative-values.patch v2 |
| 2013-04-15 - 18:29:38z thomasmey |
GeneralOptionPane-Fix-negative-values.patch v3 - removed accidential Java 7 dependency |