I've an existing tornadofx program that was still ...
# tornadofx
g
I've an existing tornadofx program that was still using
Application
instead of
App
. When I just changed it to the latter, I got an NPE on exit (in `App::stop()`because primaryStage wasn't set. I added to the existing start method
FX.setPrimaryStage
to get past that. I am now getting an NPE in the following lines, which seem to be finding and cleaning up the primary view. I'm starting to suspect "you're doing it wrong". Is my problem that I have a custom
start()
that doesn't call the super? Should I not override start at all and override some other method called by App::start instead? Should I also have overridden stop()? The existing
start()
is needed because the program has to first show a dialog box. It's possible that the user can cancel out, in which case I don't want the stage showing at all, just want to exit.
c
Overriding
start()
without calling
super.start()
is bound to cause a bunch of problems. There is a lot of critical framework setup expected to happen in there.
g
Okay, cool. For my next swing I'll try that. Thanks!