incompatible pointer type?



All,
I have a simple Gnome app with two GnomeEntry widgets in it, two buttons and
a GtkClist with two columns in it.  The idea is that the user types what
they want into the entry widgets, hits the first button, and populates the
list (the second button just calls gtk_main_quit()).

Unfortunately, when I try to compile, I get the following:

callbacks.c: In function 'on_apply_button_clicked':
callbacks.c:22: warning: passing arg 1 of 'gtk_editable_get_chars' from
incompatible pointer type
callbacks.c:22: warning: assignment makes integer from pointer without a
cast
callbacks.c:23: warning: passing arg 1 of 'gtk_editable_get_chars' from
incompatible pointer type
callbacks.c:23: warning: assignment makes integer from pointer without a
cast
callbacks.c:26: parse error before ';'

here is the offending function:

void
on_apply_button_clicked                (GtkButton       *button,
                                        gpointer         user_data)
{
	gchar 	text[2];
	gint	  i;
	
	text[0] = gtk_editable_get_chars (col1_combo, 1, -1);
	text[1] = gtk_editable_get_chars (col2_combo, 1, -1);
	
	for (i = 0; i < 2; i++){
		gtk_clist_set_text ( list, row, col, text[i];
		col++;
		}
	row++;

}


Any help would be appreciated, thanks.

Shane 



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