Created
December 10, 2013 21:40
-
-
Save rtyley/7900726 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| implicit class TextFieldOps(field: TextField) { | |
| /** Returns a stream of text field values entered in the given text field. | |
| * | |
| * @param field the text field | |
| * @return an observable with a stream of text field updates | |
| */ | |
| def textValues: Observable[String] = Observable { | |
| observer => { | |
| val reaction: Reaction = { | |
| case .. | |
| } | |
| field subscribe reaction | |
| Subscription { /* do something on unsubscribe */ } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment