I'm using Reactor in my tornadofx app. There is so...
# tornadofx
c
I'm using Reactor in my tornadofx app. There is some
messageMono: Mono<String>
and I need to set some property to the value it produces. The code which works for me is this:
Copy code
kotlin
val myPropertyDelegate = SimpleStringProperty("")
var myProperty: String by myPropertyDelegate

messageMono.subscribe {
    runLater {
        myProperty = it
    }
}
Since `Mono`s and `Flux`s are supposed to be all over the place in the app, I'm really not looking forward to writing
subscribe { runLater { } }
all the time, especially for things a bit more complex than the example. What are my options? Maybe even what I'm doing is wrong?