[Glade-users] Newbe problem with tutorial example

Tadej Borovšak tadeboro at gmail.com
Tue Feb 16 02:51:56 EST 2010


Hi.

> A url reference is:
> http://www.micahcarrick.com/12-24-2007/gtk-glade-tutorial-part-1.html
>
> You've given me a clue that the tutorial isn't worth s__t which is very
> helpful. :-) The gtk-builder-convert bothered me but remember, I'm new to
> this.

This tutorial is really nice actually, but has been a bit outdated
since Glade3-3.6 was released. Glade3-3.4 series that this tutorial
uses saved in libglade format and in order to use this file with
GtkBuilder, one needs to convert it using gtk-builder-convert into
GtkBuilder project. Micah did a really good job back then steering
people away from deprecated libglade towards GtkBuilder and it's
really not fair to call his tutorial not being worth s__t.

<snipped>
>  <widget class="GtkWindow" id="window1">
<snipped>
>    window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
<snipped>

As Tristan said, you have a name mismatch between interface file and C
code. Your main window is named "window1" in XML file and "window" in
C code. You probably missed a step in tutorial where main window is
renamed from default "window1" to "window".

Tadej

-- 
Tadej Borovšak
tadeboro.blogspot.com
tadeboro at gmail.com
tadej.borovsak at gmail.com


More information about the Glade-users mailing list