Skip to content
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

Number Format Exception When Using Arrow Keys In Input Field #285

Closed
PythooonUser opened this issue Jun 18, 2022 · 1 comment · Fixed by #295
Closed

Number Format Exception When Using Arrow Keys In Input Field #285

PythooonUser opened this issue Jun 18, 2022 · 1 comment · Fixed by #295

Comments

@PythooonUser
Copy link
Contributor

When using the arrow keys "up" and "down" in an input field that is used as a float, the following crash occurs:

Exception in thread "LWJGL Application" java.lang.NumberFormatException: For input string: "0,9"
        at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
        at sun.misc.FloatingDecimal.parseDouble(Unknown Source)
        at java.lang.Double.parseDouble(Unknown Source)
        at com.interrupt.dungeoneer.editor.ui.PropertiesMenu$5.keyDown(PropertiesMenu.java:331)
        at com.badlogic.gdx.scenes.scene2d.InputListener.handle(InputListener.java:46)
        at com.badlogic.gdx.scenes.scene2d.Actor.notify(Actor.java:183)
        at com.badlogic.gdx.scenes.scene2d.Actor.fire(Actor.java:148)
        at com.badlogic.gdx.scenes.scene2d.Stage.keyDown(Stage.java:412)
        at com.badlogic.gdx.InputMultiplexer.keyDown(InputMultiplexer.java:80)
        at com.badlogic.gdx.backends.lwjgl.LwjglInput.processEvents(LwjglInput.java:322)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:217)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)
@PythooonUser
Copy link
Contributor Author

Call to DecimalFormat.format is not applying the pattern ##.## (it uses my German locale I think nonetheless).

See DelvEdit\src\com\interrupt\dungeoneer\editor\ui\PropertiesMenu.java::337.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant