Use glib's clone! macro inside the view! macro. #160
Answered
by
edfloreshz
edfloreshz
asked this question in
Q&A
-
Is there a way we can use glib's Alternative would be to do it in |
Beta Was this translation helpful? Give feedback.
Answered by
edfloreshz
Apr 8, 2022
Replies: 1 comment
-
Just found a way! connect_clicked: clone!(@weak new_list_entry, @strong sender => move |_| {
let buffer = new_list_entry.buffer();
if !buffer.text().is_empty() {
send!(sender, SidebarMsg::AddList(buffer.text()))
}
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
AaronErhardt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just found a way!