Re: How to copy data between widgets?
- From: "RomÃn Gorojovsky" <rgorojovsky gmail com>
- To: "Tristan Van Berkom" <tvb gnome org>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How to copy data between widgets?
- Date: Tue, 8 Aug 2006 11:48:16 -0300
On 8/8/06, Tristan Van Berkom <tvb gnome org> wrote:
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.
As I said before, It's a problem with my C, not my gtk. A quite
embarrassing mistake, sorry for wasting your time.
Thanks a lot again.
Cheers,
-Tristan
--
RomÃn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]