gtk_entry_get_text



hi everyone,
 
  I've created an entry box and when i type something in the box, I would like to get the information and display it.
  Like the following using glade:
 
void
on_entry_insert_text (GtkEditable *editable,
                                gchar          *new_text,
                                gint              new_text_length,
                                gpointer        position,
                                gpointer        user_data)
{
  const gchar *str;
  str = gtk_entry_get_text (GTK_ENTRY (new_text));
 
  printf("data entered = %s\n", str);
  return;
}
 
error message:
segmentation fault
 
anyone knows how to solve?
 
regards


Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.

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