Some refactoring of the rust generated code

Always use a Pin<Rc> for the component. (This is required to support repeater
within repeater as well anyway)
Do not use the context within the binding. We can get along by simply capturing
a weak pointer to the component
This commit is contained in:
Olivier Goffart 2020-07-13 15:34:09 +02:00
parent 1a0d053889
commit ab7ae9f3e2
15 changed files with 74 additions and 73 deletions

View file

@ -3,7 +3,7 @@
sixtyfps::include_modules!();
fn main() {
let mut app = Hello::default();
let app = Hello::new();
app.plus_clicked.set_handler(|context, ()| {
let app = context.get_component::<Hello>().unwrap();