Re: getting text from an entry box
- From: "Maher Awamy" <muhri muhri net>
- To: "Jeremy Savoy" <jsavoy us ibm com>, gtk-app-devel-list gnome org
- Subject: Re: getting text from an entry box
- Date: 23 Mar 2001 22:33:57 CST
you need to g_strdup() what you get before inserting it in the glist - dont
forget to g_free() it later when you dont need it anymore ... so
config_data = g_list_append (config_data,
g_strdup(gtk_entry_get_text(GTK_ENTRY(entry1))));
is what you should be doing.
Maher
On Fri, 23 Mar 2001 16:27:32 -0500, Jeremy Savoy said:
I have a gtk text entry box that I would like to use to get information
from a user in a gnome druid app. I am using the following:
config_data = g_list_append (config_data,
gtk_entry_get_text(GTK_ENTRY(entry1)));
to get the data from the entry box 'entry1' and put it into the GList
config_data. config_data also contains data from several combo boxes, but
when I print the contents of the list, no matter what order I inserted the
data from entry1, there is always a blank line in the place of data that
was entered. I'm pretty new to gtk/gnome programming so the problem may be
obvious but I'm at a loss here. Any ideas or suggestions??
Regards,
Jeremy Savoy
Linux Admin
IBM - Retail Store Solutions
919-301-5273
jsavoy us ibm com
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
http://www.muhri.net -- muhri muhri net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]