Hi, I'm currently following the TornadoFX guide, a...
# tornadofx
a
Hi, I'm currently following the TornadoFX guide, and I'm playing with the amazing
runAsync
function, I got the following snippet from the `TornadoFX repo->testapps->AsyncProgressApp.kt`:
Copy code
kotlin
runAsync {
    updateTitle("Doing some work")
    for (i in 1..10) {
             updateMessage("Working $i...")
             if (i == 5)  updateTitle("Dome something else")
             Thread.sleep(200)
             updateProgress(i.toLong(), 10)
      }
}
My question is: If I want to move the logic inside
runAsync
block to a controller function, then how I could use
FXTask
functions like
updateTitle(), updateMessage() and updateProegress()
, supposing that I wont move the entire
runAsync
block because I want to use it with
ui
block?