aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-01-23 11:00:00 +0100
committerRobert Jaros <rjaros@finn.pl>2019-01-23 11:00:00 +0100
commit48153da7cd97c57a60ca1032d19cdec0714c4c04 (patch)
tree45ab0bcf19bcb0ad205ad4422d10d5be75f10407 /README.md
parent6c8d768508142c8a6a672b94311c8e9257f15735 (diff)
downloadkvision-48153da7cd97c57a60ca1032d19cdec0714c4c04.tar.gz
kvision-48153da7cd97c57a60ca1032d19cdec0714c4c04.tar.bz2
kvision-48153da7cd97c57a60ca1032d19cdec0714c4c04.zip
Data container enhancements and fixes.
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) {