edvin
02/27/2018, 8:15 AMabhinay
02/27/2018, 8:15 AMedvin
02/27/2018, 8:16 AMelaborate tissue
02/27/2018, 9:46 AMelaborate tissue
02/27/2018, 9:47 AMpike
02/27/2018, 11:31 AMpike
02/27/2018, 11:35 AMtableview(persons) {
column("Age", Person::Age). cellFormat {
text = if(it > 21) "This student can drink alcohol" else "They can't"
}
}
pike
02/27/2018, 11:36 AMpike
02/27/2018, 11:49 AMedvin
02/27/2018, 12:01 PMpike
02/27/2018, 12:02 PMpike
02/27/2018, 12:05 PMpike
02/27/2018, 12:06 PMpike
02/27/2018, 12:16 PMpike
02/27/2018, 12:21 PMpike
02/27/2018, 1:22 PMpike
02/27/2018, 1:30 PMimage.png▾
mariofelesdossantosjr
02/27/2018, 2:35 PM@bkenn▾
bkenn
02/27/2018, 2:36 PMpoohbar
02/27/2018, 2:40 PMrunAsync {
Thread.sleep(1000)
} ui {
doSomething()
}
this does not seem to be working correctlybkenn
02/27/2018, 2:40 PMmariofelesdossantosjr
02/27/2018, 2:43 PMbkenn
02/27/2018, 2:45 PMTreeTableView
. I haven't used it but there are examples in the docs. But I usually approach the work flow as described above.mariofelesdossantosjr
02/27/2018, 2:45 PMjkbbwr
02/27/2018, 4:23 PMjkbbwr
02/27/2018, 4:24 PMclass HelloWorld : View() {
val rows = listOf(
Row("key", "value"),
Row("test", "two")
).observable()
override val root = vbox {
tableview(rows) {
column("Field", Row::key)
column("Value", Row::value)
columnResizePolicy = SmartResize.POLICY
}
}
}
Fails with
Error:(15, 13) Kotlin: None of the following functions can be called with the arguments supplied:
public fun <S, T> TableView<Row>.column(title: String, valueProvider: (TableColumn.CellDataFeatures<Row, ???>) -> ObservableValue<???>): TableColumn<Row, ???> defined in tornadofx
public fun <S, T> TableView<Row>.column(title: String, propertyName: String, op: TableColumn<Row, ???>.() -> Unit = ...): TableColumn<Row, ???> defined in tornadofx
public fun <S, T : Any> TableView<Row>.column(title: String, cellType: KClass<???>, op: TableColumn<Row, ???>.() -> Unit = ...): TableColumn<Row, ???> defined in tornadofx
@JvmName public fun <S, T> TableView<Row>.column(title: String, getter: KFunction<???>): TableColumn<Row, ???> defined in tornadofx
public inline fun <S, reified T> TableView<Row>.column(title: String, observableFn: KFunction<ObservableValue<???>>): TableColumn<Row, ???> defined in tornadofx
public inline fun <reified S, T> TableView<Row>.column(title: String, prop: KMutableProperty1<Row, ???>, noinline op: TableColumn<Row, ???>.() -> Unit = ...): TableColumn<Row, ???> defined in tornadofx
public inline fun <reified S, T> TableView<Row>.column(title: String, prop: KProperty1<Row, ObservableValue<???>>, noinline op: TableColumn<Row, ???>.() -> Unit = ...): TableColumn<Row, ???> defined in tornadofx
jkbbwr
02/27/2018, 4:24 PMRow
being defined as data class Row(val key: String, val value: String)
jkbbwr
02/27/2018, 4:26 PMreadonlyColumn
instead.poohbar
02/27/2018, 6:12 PM