Ali, just override 'stop' function in stage ``` cl...
# tornadofx
s
Ali, just override 'stop' function in stage
Copy code
class MyApp : App(MyView::class) {
    override fun start(stage: Stage) {
... some custom code
    }
    override fun stop() {
      if(db_still_up) {
         notify_warn("can't exit right now")
       } else {
        Platform.exit()
        System.exit(0)
      }
    }
}
👍 1
a
Thanks @seiv , --that was elegant and straight--