You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,8 +147,9 @@ fun <T> Observable<T>.observeOnFx() = this.observeOn(JavaFxScheduler.getInstance
147
147
This allows you to better use Kotlin's features to interop JavaFX and RxJava much more cleanly.
148
148
149
149
```kotlin
150
-
val sourceObservable =Observable.just("Alpha","Beta","Gamma")
151
-
val lengthBinding = sourceObservable.map { it.length }.toBinding()
150
+
val textField =TextField()
151
+
val textInputs = textField.toObservable()
152
+
val lengthBinding = textInputs.map { it.length }.toBinding()
152
153
```
153
154
154
155
If you are doing JavaFX and Kotlin development, definitely check out [TornadoFX](https://github.com/edvin/tornadofx) as well to utilize type-safe builders and other features enabled by Kotlin.
0 commit comments