Seems this method activated before Notebook page get switched
self.widget.connect_switch_page({
|notebook, _, page_number| {
println!("Current:{:?}", notebook.current_page()); // previous
println!("New:{}", page_number); // currently selected
}
});
so when I’m calling another method inside this function, it still return old page_number
for get_current_page
.
in gtkmm it has another behavior or maybe in rust the issue with shared pointer.
how can I detect the event, when Notebook tab already switched so?