edvin / tornadofx

Lightweight JavaFX Framework for Kotlin
Apache License 2.0
3.67k stars 270 forks source link

Tableview column issue #677

Open aleksey-r opened 6 years ago

aleksey-r commented 6 years ago

When I try to run the code from the guide

tableview(persons) {
column("ID", Person::id);
column("Name", Person::name)
column("Birthday", Person::birthday)
column("Age", Person::age)
}

with tornadofx 1.7.15, I get an error: Error:(12, 13) Kotlin: None of the following functions can be called with the arguments supplied: public fun <S, T> TableView<Person>.column(title: String, valueProvider: (TableColumn.CellDataFeatures<Person, ???>) -> ObservableValue<???>): TableColumn<Person, ???> defined in tornadofx public fun <S, T> TableView<Person>.column(title: String, propertyName: String, op: TableColumn<Person, ???>.() -> Unit = ...): TableColumn<Person, ???> defined in tornadofx public fun <S, T : Any> TableView<Person>.column(title: String, cellType: KClass<???>, op: TableColumn<Person, ???>.() -> Unit = ...): TableColumn<Person, ???> defined in tornadofx @JvmName public fun <S, T> TableView<Person>.column(title: String, getter: KFunction<???>): TableColumn<Person, ???> defined in tornadofx public inline fun <S, reified T> TableView<Person>.column(title: String, observableFn: KFunction<ObservableValue<???>>): TableColumn<Person, ???> defined in tornadofx public inline fun <reified S, T> TableView<Person>.column(title: String, prop: KMutableProperty1<Person, ???>, noinline op: TableColumn<Person, ???>.() -> Unit = ...): TableColumn<Person, ???> defined in tornadofx public inline fun <reified S, T> TableView<Person>.column(title: String, prop: KProperty1<Person, ObservableValue<???>>, noinline op: TableColumn<Person, ???>.() -> Unit = ...): TableColumn<Person, ???> defined in tornadofx

With version 1.7.14, the code is executed normally.

edvin commented 6 years ago

We had to rename the column builder for POJO/POKO read only columns to readonlyColumn. I will update the guide. Thanks!