Re: [gtk-list] Re: Ataching data to a widget



On Thu, Jun 03, 1999 at 12:37:54PM -0400, Owen Taylor wrote:
> 
> Alan Shutko <ats@acm.org> writes:
> 
> > Sven LUTHER <luther@maxime.u-strasbg.fr> writes:
> > 
> > > Better would be to use gtk_object_set_user_data and
> > > gtk_object_get_user_data, isn't it ?
> > 
> > Why is that?  I've been using gtk_object_get_data  and
> > gtk_object_set_data, which are nice because you can set multiple
> > pieces of data with string names.  Am I doing something wrong?
> 
> No.
> 
> gtk_object_set_user_data() is basically just there for
> compatibility with (very) old versions of GTK+ that
> only allowed setting a single piece of data per-widget.
> 
> Using gtk_object_set_data() is the preferred method.

Hello, ...

is it normal that when i do :

gtk_object_set_data_full (widget, "user_data", ...)
	 
and later 

gtk_object_get_user_data (widget);

i don't get the same data returned.

I will no more use the user_data function, but still, it was written in the
includes, that gtk_object_set/get_data (widget, "user_data", ...) is the same
as gtk_object_set/get_user_data. If it is no more the case it should be
corrected, also it would be best to state clearly in the includes that
user_data is no more to be used.

Friendly,

Sven LUTHER



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