-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data-binding #8
Comments
As general direction - yes, it should support some data-binding, but I think it should be separate library. No concrete plans for now. |
Hello, we (@andreas-mausch and me) would like to work on it. We already have a prototype version of this running (included in the DSL, not a separate library), but we are not sure how to test it. We found some files in the test directory, but can not make any sense of them. How can we write unit-tests for the stuff we came up with? Our prototype is implementing the same as you can see in this vueJS example here: https://vuejs.org/v2/guide/#Handling-User-Input (app-6) -- the one with the input and the text. |
Introduce an Observable to give anything that extends it the ability to attach and call listeners that communicate a value change passing the new value. Refer to issue: msink#8 Co-authored-by: Andreas Mausch <andreas.mausch@gmail.com>
Introduce an Observable to give anything that extends it the ability to attach and call listeners that communicate a value change passing the new value. Refer to issue: msink#8 Co-authored-by: Andreas Mausch <andreas.mausch@gmail.com>
Refer to issue: msink#8 Co-authored-by: Andreas Mausch <andreas.mausch@gmail.com>
Add possibility to do data binding to label and textfield and introduce a simple example in the samples, to showcase a shared string value between an input and a label. Refer to issue: msink#8 Co-authored-by: Andreas Mausch <andreas.mausch@gmail.com>
Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
Don't let users be confused by the optional parameters in the DSL. Now we provide two versions which force you to set the correct parameters. Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
About tests - Anyway it too should wait for migration to 'multiplatform' plugin. |
Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
* For the DSL, the model is still optional * New sample data-binding-2, which features all new model-using widgets Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
* Provide a list of values and a ModelEntry for the selected element * When a different item is selected, the model is updated accordingly * Values can be list of a user-defined type, the text displayed is the toString() * Changes to the values are not reflected yet (WIP) Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
Refer to issue: msink#8 Co-authored-by: Mervyn McCreight <mervyn.mccreight@gmail.com>
@msink Can you take a look at the changes in this branch and tell us if you like it? https://github.com/mervyn-mccreight/kotlin-libui/tree/data-binding Just check the new examples data-binding-1 and 2 to get an impression. It's not complete yet, and we want to rename "ModelEntry" to "Property" to be more similar to TornadoFX. |
I'm not competent in this area, but to me it looks overcomplicated. Maybe more clean way could be using coroutines. |
Do you plan to support some kind of data-binding?
I think of it in a way that you pass a model object (Observable?) to a TextField, and each time the string is changed, the UI is changed as well.
And, additionally, each time the user types into the TextField, the model object get's changed automatically.
The text was updated successfully, but these errors were encountered: