aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index c189f434..0ec4f2e8 100644
--- a/README.md
+++ b/README.md
@@ -153,16 +153,16 @@ Application package will be saved as build/distributions/showcase.zip.
### Data binding with observable data model
class Data(text: String) : BaseDataComponent() {
- var text: String by obs(text)
+ var text by obs(text)
}
val model = observableListOf(
Data("One"),
Data("Two"),
Data("Three")
)
- Root("root").add(DataContainer(model, { index, data ->
+ Root("root").add(DataContainer(model, { data, _, _ ->
Label(data.text)
- }, child = HPanel(spacing = 10, wrap = FlexWrap.WRAP)))
+ }, HPanel(spacing = 10, wrap = FlexWrap.WRAP)))
GlobalScope.launch { // Kotlin coroutines
while (true) {