[Glade-users] Passing objects to libglade callbacks



Russell,=20

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=
g..

G=FCnther.


Russell Shaw <rjshaw iprimus com au> schrieb am 05.08.03 10:16:10:
=20
Hi,
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).
=20
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
=20
#include <gtk/gtk.h>
#include <glade/glade.h>
#include <glib.h>
=20
void on=5Fbutton=5Fclicked(GtkWidget *widget, gpointer user=5Fdata) {
     g=5Fprint("Butt=3D%d\n",GPOINTER=5FTO=5FINT(user=5Fdata));
//    g=5Fprint("Butt=3D%d\n",*((gint*)user=5Fdata));
}
=20
int main(int argc, char *argv[])
{
     GladeXML *xml;
=20
     gtk=5Finit(&argc, &argv);
     glade=5Finit();
=20
     /* load the interface */
     xml =3D glade=5Fxml=5Fnew("keypad.glade",NULL,NULL);
     /* connect the signals in the interface */
     glade=5Fxml=5Fsignal=5Fautoconnect(xml);
     /* start the event loop */
     gtk=5Fmain();
     return 0;
}
=20
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Glade-users maillist  -  Glade-users lists ximian com
http://lists.ximian.com/mailman/listinfo/glade-users


=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F
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]