Hi... Something very strange or stupid is hapening I am making a software to aprove a subject using glade under Debian woody (first release) that is why its desing is so ugly (shoud seems that works :) and i need this function to find the row number containig the text "texto" in the column "columna" int find_row(GtkCList *lista,char *texto,int columna) { char **texto_temp; int i=0; if(texto==NULL) return -1; while(gtk_clist_get_text(lista,i,columna,texto_temp)){ printf("TEXTO NRO %d:%s\n",i,*texto_temp); // if(strcmp(texto,*texto_temp)==0) return i; i++; } return -1; } and just for testing it i call it from a button callback void on_provincia_guardar_button_clicked (GtkButton *button, gpointer user_data) { printf("FIND_ROW:%d\n",find_row((GtkCList*)provincia_abm.clist,"Cordoba",0)); } Now this is the strange partIf i click the button with the mouse, i get a SEGV signal but if i press tab till
get focus over "guardar" button and then press enter it works ok :(I have attach a modified version of the clist example program wich came with GTK
to test it easier. So if someone wants to waste time... well try it :) Thanks in advance Juan Pablo _________________________________________________________________MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus
Attachment:
clist_test.tar.bz2
Description: Binary data