[Glade-users] string

You may wat to post this to the gtk-app-devel-list.  Also posting your
maj_tle function would help.  Without it I can only guess that you are
doing something with the string that the GtkEntry widget does not like. 
The string returned by get_text is still owned by the GtkEntry and can
not be freed.  Also if you free the GtkEntry widget somewhere in the
function the value returned will be pointing to deallocated memory.  The
best thing to do is to strdup the value returned by get_text and then
free it after the function returns.


On Sat, 2004-01-10 at 11:15, christophe Meyer wrote:
I simply want to use a string comming from a gtk entry, in a classical
c function but it doesn't work and makes me a segmentation fault :(

This is a part of my callbacks.c file:

on_bouton_maj_clicked(GtkButton       *button,
                                        gpointer         user_data)
  GtkWidget * entry = lookup_widget(GTK_WIDGET(button), "url_maj");

The function maj_tle() needs as only parameter a classical char *string 
and writes it in file using fopen(), fprintf() ...
For example if i use maj_tle("example") it works.
What should i do to solve that ?
Thanks for your help :) 


Glade-users maillist  -  Glade-users lists ximian com

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