Re: get datas from entries...



Hi!

char *str=gtk_entry_get_text(GTK_ENTRY(entry));> 
Well, thanks for your help, but it seems this callbacks doesn't compile, here's the function:
void entry_callback(GtlWidget *entry, GtkWidget **widget) { /*line 8*/
  GtkWidget *MainText;
  MainText = widget[0];
  char *str=gtk_entry_get_text(GTK_ENTRY(entry));
  gtk_insert_text(GTK_TEXT(MainText), str);   
  g_print("%s\n", str);
}

here's the error:

4.c:10: `widget' undeclared (first use in this function)
        GtkWidget *main_text = *widget [0];



4.c:11: parse error before `char'

        you can't declare a variable after initialize another one:



4.c:12: warning: implicit declaration of function `gtk_insert_text'

        gtk_insert_text or gtk_text_insert ?



4.c:12: `str' undeclared (first use in this function)

        this error disappears if you re-compile 






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