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
I just went through the mini tutorial in the README.md, and I really like this library to provide structure to my GTK-rs applications, but I need to use a gtk::TextView and when I tried to make it work with the view! macro it failed.
Code:
pubstructModel{file_contents:String,// … more things}//in view!
gtk::TextView{text:{let text_buffer = TextBuffer::new(None);
text_buffer.set_text(self.model.file_contents);Some(text_buffer)}}
MCVE (might have some other trivial errors and isn't complete (I wanted to make a trivial notepad clone to try out the library), but it demonstrates the issue):
Maybe you can create the buffer in the model() method and set it normally in the view!macro.
But, as mentioned here, GTK+ models do not integrate with relm models yet, so you'll have to modify your buffer manually.
I just went through the mini tutorial in the README.md, and I really like this library to provide structure to my GTK-rs applications, but I need to use a
gtk::TextView
and when I tried to make it work with theview!
macro it failed.Code:
Error:
Versions of my dependencies:
MCVE (might have some other trivial errors and isn't complete (I wanted to make a trivial notepad clone to try out the library), but it demonstrates the issue):
I assume that this means that the view! macro doesn't support blocks, but given this, I don't see how I can use a
gtk::TextView
.The text was updated successfully, but these errors were encountered: