I've been trying to get `openIntenalWindow` to wor...
# tornadofx
h
I've been trying to get
openIntenalWindow
to work, but it keeps throwing an exception:
Copy code
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method tornadofx.UIComponent.openInternalWindow, parameter owner
I've tried the simplest form of code I could think of and it still doesn't work:
Copy code
class Start : App(MainView::class, HeaderStyle::class)

class MainView : View() {
    override val root = borderpane {
        openInternalWindow<FooView>()
    }
}


class FooView : View() {
    override val root = borderpane {

    }
}

fun main() = launch<Start>()
The tornadofx documentation feels really lackluster around this method. The example passes in an type
Editor
but I don't find anywhere it explains what that editor is
It appears I got it to work when initializing on button press, but not on instantiation of a view
is there anyway to get it to do that
I'm doing some cheeky shit to get it to open late
c
The View won't have an owner yet inside its constructor. Could you implement onDock in MainView and move the openInternalWindow call there?
h
Ah, onDock. That's what I was looking for. Thank you
👍 1