package com.datacumulus.views import javafx.beans.property.SimpleStringProperty import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.javafx.JavaFx import kotlinx.coroutines.launch import tornadofx.* class Data(text: String) { val textProperty = SimpleStringProperty(text) var text by textProperty } class Test : View("My View") { val data = mutableListOf().observable() init { task { listOf(Data("initial")) } success { data.addAll(it) val item = data.first() item.text = "before" // Updates the table GlobalScope.launch(context = Dispatchers.JavaFx) { println(Thread.currentThread().name) item.text = "inside" // Doesn't update the table } } } override val root = tableview(data) { readonlyColumn("text", Data::text) } }