I am having a bit of a problem with constantly updating an fltk frame. I have tried to google a few things but anything that should have worked from other answers (e.g: using & / &mut but it doesnt seem to work)
fn main() {
println!("{}", &time_tick());
let app = app::App::default();
let mut wind = Window::default()
.with_size(500, 600)
.center_screen()
.with_label("Counter");
let mut frame = Frame::default()
.with_size(100, 40)
.center_of(&wind)
.with_label(&time_tick());
wind.make_resizable(true);
wind.end();
wind.show();
/* Event handling */
thread::spawn(move || {
app.run().unwrap();
});
loop {
wind.set_callback( move |_| frame.set_label(&time_tick()));
}
}