Re: entry problem /segfaul again)

Mauro Venanzi wrote:

> it segfauls
Are you using v or entry_text ?

If it still segfaults, it means you destroyed the gtkentry from where
you're getting text.
To workaround:

> > static gchar *entry_text;(global to file)
static gchar* entry_text=NULL;
> > void get_the_text (GtkWidget *widget, GtkWidget *entry)
> > {
if(entry_text) g_free(entry_text); // Maybe the if() isn't needed...
> >   printf("Entry contents: %s\n", entry_text);
> > }

Now does it work?

PS: never used Anjuta IDE or at least Glade to start drawing interfaces?


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