Fun times. I'm doing full screen stage by running ...
# tornadofx
r
Fun times. I'm doing full screen stage by running
find<MyFragment>(params = mapOf(...)).openWindow(...)?.apply { isFullscreen = true }
. The thing is my fragment's constructor is called two times in a row -- first by my own invocation of
find
with properly passed
params
, and the second time this stuff can be found in stack trace:
Copy code
...
java.lang.Class.newInstance(Class.java:442)
tornadofx.FXKt.find(FX.kt:423)
tornadofx.FXKt.find$default(FX.kt:393)
tornadofx.FX$Companion.replaceComponent(FX.kt:262)
tornadofx.NodesKt.reloadViews(Nodes.kt:144)
...
javafx.stage.Window.setFocused(Window.java:439)
...
java.security.AccessController.doPrivileged(Native Method)
...
Of course it doesn't find any parameters and crashes in my
onDock()
later. Any suggestions?