Destroying a Window and re-creating it



I made a mistake in the subject of this mail, sorry. 

-----Message d'origine-----
De : gtk-list-bounces gnome org [mailto:gtk-list-bounces gnome org] De la part de zze-DEPREZ Olivier FTRD/DMI/SOP
Envoyé : mercredi 23 juin 2004 09:00
À : gtk-list gnome org
Objet : RE : gtkwidgexts


Hello, 

I have some problems while passing arguments to a function in GTK+ 2.4.2. 
This function takes as argument a GtkWidget * (no interest) and a gpointer. 
This gpointer is in fact a list (Glist *) containing some information I need and the parent window. 
Everything goes fine untill I want to close this window with gtk_widget_destroy(). It always works the first time, but crashes with a segfault the second or third time. 
It seems to me that when I create again the parent window and the list of parameters I want to give to my function, there is a problem of allocation/reallocation or something like that ... 

I guess you would like to see the output errors, but it's not very explicit: bunch of lines with Glib-Object-WARNING : "invalid cast", or with Gtk-CRITICAL: "assertion GTK_IS_(...) failed". 

Do the gtk_widget_destroy() freeds all the memory a Widget used, especially single and double-chained lists ?

Thanks,

Olivier

P.S. For Jan Marek Glogowski> I looked into the code of Gtk+Widgexts and tried to adapt it to GTK+ 2, but as I'm not used to create my own Widget, I still have some troubles into not getting run-time errors. I'll keep trying if I have time !


-----Message d'origine-----
De : Jan-Marek Glogowski [mailto:glogow fbihome de] 
Envoyé : jeudi 17 juin 2004 13:08
À : zze-DEPREZ Olivier FTRD/DMI/SOP
Cc : gtk-list gnome org
Objet : Re: gtkwidgexts


Hi Olivier

GTK+Widgexts uses the old Gtk+ 1.2.x version. To use it with 2.x, you
GTK+have
to migrate it to the new API, which will take some time, but shouldn't be to hard, because it just uses the GtkEntry. Basically you have to rewrite the object / class init code - just look at the existing Gtk+ code.

HTH

Jan-Marek
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list



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