Re: gtk_object_remove_all_data ?



>
>Hi,
>In gtk, you can associate data to an object like this :
>gtk_object_set_data (object, string, pointer);
>
>But I want to know if it is possible to have a function which remove
>all data from an object without doing a loop on all associate data ?
>I ask this because I have a program that create its own association
>between a canvas and pointer to canvas_item, but when I remove all
>canvas_item the association still exist, so I have to remove all my
>data
>Regards,
>-- Florent
>

This IMHO should do

  g_datalist_init (&object->object_data);

or, which is equivalent

  object->object_data = NULL;

But, I'm afraid, you'd better do not do such things at all, since
doing that, you remove any properties that someone else has set (for
example, glade assign names for objects using this property list).

Vladimir V. Tsichevski
senior expert

-----------------------------------------------------
                  Jet Infosystems
Krasnoproletarskaya 6,		Tel. (+7 095) 972-1182
Moscow 103006, Russia		Fax  (+7 095) 972-0791
-----------------------------------------------------
Any opinions or recommendations herein are those of
the author and not of his computer.





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