-
Here is the minimalized example about the case which confuses me. slint::slint! {
export global Logic {
callback app_init();
}
export component App inherits Window {
init => {
debug("1");
Logic.app_init();
}
}
}
fn main() {
let app = App::new().unwrap();
app.global::<Logic>().on_app_init(|| {
// Not executed
println!("2");
});
app.run().unwrap();
} I'd expect to have
as the output but I have
am I missing something? Thanks in advance 🙏 |
Beta Was this translation helpful? Give feedback.
Answered by
ogoffart
Jul 26, 2024
Replies: 1 comment
-
The thing is that the |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
alisomay
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The thing is that the
init
is called as a result of App::new() before you have the chance to set the callback. That's why it doesn't work.