Closed MGlolenstine closed 4 years ago
A widget can have a parameter to its model()
method.
And you can set the parameter like this.
The other way is to create a binding for a relm widget message like you were trying to do, but the syntax is:
Index: 0
A capital letter indicates it's a relm widget message (i.e. will send a message), while a lowercase letter (index: 0
) is a gtk property (i.e. will call set_index(0)
).
(By the way, thanks for all your questions, I will make sure to write tutorials about this stuff.)
Thanks for all the help!
(and you're welcome ;) I know how hard it is to write a good documentation, so I'll keep on asking if I don't find something!)
I want to implement my own ListView, and I'd like to send elements (
String
) into the view on the init of the View.So far, I've tried the following, but it just results in some errors
and this is my
list_view.rs
, that has model, messages and the struct declaration`list_view.rs` code
```Rust pub struct ListModel { pub values: VecThe error I'm getting is