[Glade-users] Compile problems

Damon Chaplin damon@ximian.com
Thu, 10 May 2001 14:23:53 -0400


Ed Winchester wrote:

> this line in the Glade generated interface.c is:
> "gtk_signal_connect (GTK_OBJECT (my_widget_1), "clicked",
> GTK_SIGNAL_FUNC (on_widget_clicked), 1"
> 
> My application has several places where I have a related group of
> widgets, such as GtkEntry.  I had hoped to get all the pointers to these
> widgets and keep them in an array, and have each of them signal a common
> routine, with the data element indicating which element of the array was
> activated.  Did I do something wrong here, or did Glade?

The data passed to signal handlers is a gpointer, so you can't just use
an integer.

You could either use GINT_TO_POINTER (1), to cast it to a gpointer,
or use a string "1".

Damon