Re: [gtk-list] Working gtk_widget_destroy around

Rafael Peregrino da Silva wrote:
> I have a dialog box with some entries and once the dialog box is destroyed
> all the pointers to the entries are again unitialized (and so on the
> global variables in whose I saved the entries values are lost). How could
> I workaround this, i.e., how can I keep the values that were saved on the
> global variables? 

You need to take copies of stuff you want to keep in your 'OK' handler.
For example, if you want to save the value of a text widget, use
g_strdup() on the string. Other types will need other copiers, of

Hope this helps,

John Cupitt,, +44 (0)171 747 2570
VASARI Lab, The National Gallery, Trafalgar Square, London, WC2N 5DN

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