in reply to Can't call method "get_screen" on an undefined value
There are probably a couple of ways to deal with it. One is to put the get_screen after the show_all, possibly with a short timer, but a better way would be to find out how to test for visibility, by seeing if the $mw is mapped.
I don't have an example handy, but google for how to detect if a Gtk3 window is mapped, or present. Try finding the event for window_is_mapped or present(). Then you could use the is_mapped callback to run get_screen().
|
|---|