Closed sanpii closed 4 years ago
I'm not sure I understand your problem: Component::widget()
is still there.
There's also a Widget::root()
method.
Yes but in 0.9 it returns WIDGET
and WIDGET::Root
in 0.10: https://github.com/antoyo/relm/compare/0.9.0...0.10.0#diff-852c8250af37b95ed01ce8c7dc82e312L71-R67
- /// Get the widget of this component.
- pub fn widget(&self) -> &WIDGET {
- &self.0.widget
+ /// Get the widget of the component.
+ pub fn widget(&self) -> &WIDGET::Root {
+ &self.widget
Oh, that was unsound. In relm, there's only one owner to a widget. The way to "access" a child widget is through communication.
Ok, I definitively need to rethink my application. Thank you.
In relm 0.9, the method
relm::Component::widget()
returns therelm::Widget
but since 0.10 it returnsrelm::Widget::Root
. Is there another way to interact withrelm::Widget
in a parent widget?