Re: How to copy data between widgets?



RomÃn Gorojovsky wrote:
[...]
IIRC I did

   GtkWidget *label;
   struct my_data *data;

   /* Initialize label */

   data->l = label;

and got a Segmentation fault there.  But I'll try again I guess....

my_data is a wild pointer here, you must either allocate it on the heap
and ensure that it is freed at the appropriate time, or declare it on
the stack globally or staticly.

Cheers,
                   -Tristan



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