I try to load the interface description from the xml file, something does not work out, what is wrong in this case and how will it be correct?
class MyApplication: Gtk.Application { private Gtk.Window window; protected override void activate() { window.show_all(); } protected override void startup() { base.startup(); var builder = new Gtk.Builder(); try { builder.add_from_file("main.ui"); } catch(Error e) { error("Unable to load file: %s", e.message); } this.window = builder.get_object("window") as Gtk.Window; } } public int main(string[] args) { return new MyApplication().run(args); } Error starting:
(main: 25258): Gtk-CRITICAL **: gtk_widget_show_all: assertion 'GTK_IS_WIDGET (widget)' failed
main.ui - http://pastebin.com/XaVyDuaH