Closed johanneslerch closed 8 years ago
Hi Johannes,
Thank you for your PR. I wasn't able to reproduce the issue, the editor runs ok for me but I think that using JavaFx to get the screen resolution is not necessary, I can use Libgdx so I reduce the dependency from JavaFx.
I commit the fix in master, can you check if it works for you?
Thank you.
Hi, that solved the issue as well, thank you!
If i try to run the editor via gradlew run or via launching Main.main from within Eclipse i get the following exception:
Exception in thread "main" java.lang.ExceptionInInitializerError at com.bladecoder.engineeditor.Main.main(Main.java:42) Caused by: java.lang.IllegalStateException: This operation is permitted on the event thread only; currentThread = main at com.sun.glass.ui.Application.checkEventThread(Unknown Source) at com.sun.glass.ui.Screen.setEventHandler(Unknown Source) at com.sun.javafx.tk.quantum.QuantumToolkit.setScreenConfigurationListener(Unknown Source) at javafx.stage.Screen.(Unknown Source)
... 1 more
Not sure why you did not encounter similar issues, yet. But, by simply wrapping the code in the main method by a call to Platform.runLater the issue is fixed.