edvin/tornadofx-guide

bug in snippet at '5 Data Controls'

serge-ivamov opened this issue · 1 comments

Person::age - need to be readonly.

override val root = tableview(persons) {
    isEditable = true
    column("ID",Person::idProperty).makeEditable()
    column("Name", Person::nameProperty).makeEditable()
    column("Birthday", Person::birthdayProperty).makeEditable()
    column("Age",Person::age)
}

working version:

override val root = tableview(persons) {
    isEditable = true
    column("ID",Person::idProperty).makeEditable()
    column("Name", Person::nameProperty).makeEditable()
    column("Birthday", Person::birthdayProperty).makeEditable()
    readonlyColumn("Age",Person::age)
}
edvin commented

Thanks, fixed :)