Guys,
I have a situation that I have a two togglebuttons on my ui. I want to have a behavior that if I click one toggle button, the other one gets untoggled.
So far I cannot simply do:
button_a.connect_clicked(bla bla)
because of the errors with regards to lifetimes, moved values etc.
Does anyone have an idea how to accomplish this?
Thanks
I've read it and unless I've missed something I don't see any example there that would be appropriate to my scenario.
I think you will want to use the glib::clone!
macro to copy references to the widgets into your signal handler. There is a blog post explainer here: Lifetimes, Clones, and Closures: Explaining the βglib::clone!()β Macro β Chris's Design & Development
3 Likes
Thanks for the interesting read. In the end I've solved it by binding properties - which actually is explained in the book.