[Glade-users] Passing objects to libglade callbacks


I'm not sure on what you want to do, but I think you might be using the Ob=
ject field in a wrong manner... I might be just guessing, since I actually=
 never used it, but I think it is used to determine the object which shoul=
d receive the specified signal, and therefore, "1" doesn't make any sense =
to me.....

I would try finding out what it really means.. and again, I'm just guessin=


Russell Shaw <rjshaw iprimus com au> schrieb am 05.08.03 10:16:10:
I put a button on a glade-2.0 window. In the properties form,
i selected the "clicked" signal. For the handler, i entered
"on=5Fbutton=5Fclicked". For the object, i entered "1" (without
the quotes).
In the following gtk+2 program, when i click the button, the
on=5Fbutton=5Fclicked callback prints a very large integer instead
of "1". Why=3F
#include <gtk/gtk.h>
#include <glade/glade.h>
#include <glib.h>
void on=5Fbutton=5Fclicked(GtkWidget *widget, gpointer user=5Fdata) {
//    g=5Fprint("Butt=3D%d\n",*((gint*)user=5Fdata));
int main(int argc, char *argv[])
     GladeXML *xml;
     gtk=5Finit(&argc, &argv);
     /* load the interface */
     xml =3D glade=5Fxml=5Fnew("keypad.glade",NULL,NULL);
     /* connect the signals in the interface */
     /* start the event loop */
     return 0;
Glade-users maillist  -  Glade-users lists ximian com

ComputerBild (15-03) empfiehlt: Der beste Spam-Schutz ist bei
WEB.DE FreeMail - Deutschlands beste E-Mail - http://s.web.de/=3Fmc=3D021124

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