ron
10/18/2016, 7:04 PMclass CategoryEntry(title: String, url: String, val types: String) : Entry(title, url) {
override fun toString(): String {
return super.toString()+"- $types"
}
}
class CategoryEntryModel(val categoryentry: CategoryEntry) : ViewModel() {
val types = bind { SimpleStringProperty(categoryentry.types) }
}
ron
10/18/2016, 7:04 PMron
10/18/2016, 7:05 PMonUserSelect {
controller.categoryEntryModel.rebind {
categoryentry = selectedItem ?: CategoryEntry("", "", 0)
}
}
ron
10/18/2016, 7:06 PMedvin
10/18/2016, 7:20 PMItemViewModel
instead 🙂ron
10/18/2016, 7:21 PMron
10/18/2016, 7:21 PMron
10/18/2016, 7:22 PMron
10/18/2016, 7:23 PMron
10/18/2016, 7:23 PMron
10/18/2016, 7:23 PMron
10/18/2016, 7:23 PMron
10/18/2016, 7:24 PMron
10/18/2016, 7:25 PMcategoryEntryModel.onchange {
runAsync {
// something to run
} ui {
items = it
}
}
edvin
10/18/2016, 7:34 PMedvin
10/18/2016, 7:36 PMedvin
10/18/2016, 7:36 PMasyncItems { something to run that returns items }
instead, but I don't think I understand what you're asking yet? 🙂ron
10/18/2016, 7:37 PMron
10/18/2016, 7:37 PMedvin
10/18/2016, 7:37 PMron
10/18/2016, 7:38 PMron
10/18/2016, 7:38 PMron
10/18/2016, 7:38 PMedvin
10/18/2016, 7:39 PMron
10/18/2016, 7:39 PMron
10/18/2016, 7:39 PMron
10/18/2016, 7:39 PMron
10/18/2016, 7:39 PMedvin
10/18/2016, 7:40 PMasyncItems
or runAsync
and assigning to items like you wrote above. That seems good to me.edvin
10/18/2016, 7:40 PM