[Glade-users] gtk_entry_get_text
Aaron Yang
porsche1904@yahoo.com
Thu, 13 Jan 2005 19:46:57 -0800 (PST)
--0-1537386309-1105674417=:2665
Content-Type: text/plain; charset=us-ascii
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.
--0-1537386309-1105674417=:2665
Content-Type: text/html; charset=us-ascii
<DIV>hi everyone,</DIV>
<DIV> </DIV>
<DIV> I've created an entry box and when i type something in the box, I would like to get the information and display it.</DIV>
<DIV> Like the following using glade:</DIV>
<DIV> </DIV>
<DIV>void</DIV>
<DIV>on_entry_insert_text (GtkEditable *editable,</DIV>
<DIV> gchar *new_text,</DIV>
<DIV> gint new_text_length,</DIV>
<DIV> gpointer position,</DIV>
<DIV> gpointer user_data)</DIV>
<DIV>{</DIV>
<DIV> const gchar *str;</DIV>
<DIV> str = gtk_entry_get_text (GTK_ENTRY (new_text));</DIV>
<DIV> </DIV>
<DIV> printf("data entered = %s\n", str);</DIV>
<DIV> return;</DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV>error message:</DIV>
<DIV>segmentation fault</DIV>
<DIV> </DIV>
<DIV>anyone knows how to solve?</DIV>
<DIV> </DIV>
<DIV>regards</DIV><p>
<hr size=1>Do you Yahoo!?<br>
Yahoo! Mail - Easier than ever with enhanced search. <a href="http://us.rd.yahoo.com/evt=29916/*http://info.mail.yahoo.com/mail_250">Learn more.</a>
--0-1537386309-1105674417=:2665--