<@U0F3291QE> I am trying to use MutableList&lt;Pe...
# tornadofx
a
@edvin I am trying to use MutableList<Person> inside listview , but it says required Readonly list inside listview
Copy code
class MainView : View() {

    val persons : MutableList<Person> = mutableListOf<Person>().observable() //custom Class MutableList

    var taskName: TextField by singleAssign()


    override val root = vbox {
        taskName = textfield {
            action {
                persons.add(Person(taskName.text))
            }
        }
        listview(persons) {              // error here
            cellFormat {
                graphic = cache {
                    form {
                        fieldset {
                            label(it.name)
                            alignment = Pos.CENTER
                            style {
                                fontSize = 22.px
                                fontWeight = FontWeight.BOLD
                            }

                        }
                    }
                }
            }
        }
    }
}

class Person(val name: String)
Slack Conversation