-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non valid number as font size results in an uncaught exception. #7415
Comments
Interesting, I thought that a Spinner was already restricted to numbers, but turns out it's not https://stackoverflow.com/a/36749659 |
So did I at first, but you can specify the datatype of the Spinner in the declaration. As it appears in the log, an
I think it will be great if we can fix it without changing the GUI, so if anyone has any comments or might want to work on this issue, just mention it here. |
I have found a fix where you bind an event handler directly to the |
I think I have found a solution based on the TextFormatter the trick is to not return null:
When you enter a char it will return 0. Returning null results in an exception as well |
I will try it and see if it works. |
Could using ControlsFX (which jabref apparently uses?) Validation library help here? |
@koobs There is already a validation for that control, but that doesn't prevent the exception |
Latest JabRef version build on Ubuntu 20.04.1 LTS.
If you enter a non valid value such as a character to the font size spinner under the appearances tab in the preference dialog and press enter, 2 exception dialogs will appear.
Steps to reproduce the behavior:
a
.Log File
The text was updated successfully, but these errors were encountered: