[Glade-devel] auto connect signals



On Wed, Aug 5, 2009 at 11:37 PM, Xiao Yafeng<xyf.xiao at gmail.com> wrote:
I'm new to glade programming. below is my first gtk+ snippet with glade.
hello.c:
[...]
error message:

(hello:8403): Gtk-WARNING **: Could not lookup object NULL on signal clicked
of object button_quit

(hello:8403): Gtk-CRITICAL **: gtk_main_quit: assertion `main_loops != NULL'
failed
Segmentation fault


It seems NULL is cause of failure, but who can post a correct code to prove
my guess?


The "object" parameter is a string to be set by the user in Glade - I have no
idea how you ended up with the string NULL, it should just be empty if you
dont want to specify an object.

Note also when using the "object" (userdata) field, the specified object will
be swapped with the emitting object and thus come first in the callback`s
argument list (the string specified for "object" is a name of another object
in the same Glade file).

Cheers,
          -Tristan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]