carlw
05/06/2017, 9:24 PMcarlw
05/06/2017, 9:27 PMkastork
05/06/2017, 9:29 PMcarlw
05/06/2017, 9:46 PMedvin
05/06/2017, 10:01 PMrunAsync { controller.doStuff(this) }
- then you can do task.updateProgress()
from your controller function.edvin
05/06/2017, 10:02 PMupdateProgress
, updateMessage
etc are protected, but they are public in FXTask
, which is the type of this
in my example above.edvin
05/06/2017, 10:02 PMrunAsync
inside of controller.doStuff()
.kastork
05/06/2017, 10:44 PMrunAsyncWithProgress
, right?kastork
05/06/2017, 10:47 PMfun doStuff(archivePath: String, task: FXTask) {...}
doesn't compile, I guess I need a type parameter on FSTask
kastork
05/06/2017, 10:53 PMTask<Unit>
kastork
05/06/2017, 11:03 PMrunAsyncWithProgress
, this
is an ActionEvent
edvin
05/07/2017, 9:26 AMrunAsyncWithProgress
I think. withProgress will run in the context of a node, and replace that node with a progress indicator while the task is running.edvin
05/07/2017, 9:28 AMrunAsync { doStuff(archivePath, this)
should work against fun doStuff(archivePath: String, task: FXTask<*>)
.carlw
05/07/2017, 11:03 AMedvin
05/07/2017, 11:19 AMedvin
05/07/2017, 11:19 AMedvin
05/07/2017, 11:20 AMkastork
05/07/2017, 1:40 PMrun AsyncWithProgress
work with my own progress view that displayed the message updates. I'll do a more conventional status line, something like what the test app does.edvin
05/07/2017, 1:54 PMTaskStatus
object. Pass it into runAsync
and update it there. Bind it to the UI or status line.kastork
05/07/2017, 2:04 PMedvin
05/07/2017, 2:04 PMkastork
05/07/2017, 2:11 PMedvin
05/07/2017, 2:11 PMkastork
05/07/2017, 2:12 PMedvin
05/07/2017, 2:17 PMcarlw
05/07/2017, 2:29 PMcarlw
05/07/2017, 2:29 PMcarlw
05/07/2017, 2:32 PMedvin
05/07/2017, 2:32 PM