Re: Segmentation fault while reading from entry.



Szymon,

In addition to what Yeti has pointed out, one thing that's obviously wrong
is that you don't seem to have anything in your code that adds the text
entry
to the window, i.e.

gtk_container_add(GTK_CONTAINER(windowP), widgetP);

Also, why not use gtk_entry_get_text(...) to read the content of the entry:

const char* textP = gtk_entry_get_text(GTK_ENTRY(widgetP));

And remember that the resulting char* may not be modified, freed, or stored,

as per
http://developer.gnome.org/doc/API/2.0/gtk/GtkEntry.html#gtk-entry-get-text



Best,

Nickolai



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