[Gtk-sharp-list] Associate user data object with a widget

Chuck Esterbrook chuck.esterbrook at gmail.com
Thu Nov 26 14:37:55 EST 2009


On Thu, Nov 26, 2009 at 9:37 AM, Christian Hoff <christian_hoff at gmx.net> wrote:
> Hey guys,
>
> GLib.Object.Data is deprecated according to the docs, but it is not marked
> obsolete in the code for whatever reason. Maybe this decision has been
> reverted and the docs have not been updated yet.
>
> In any case, that means that it won't be removed in Gtk# 3.0. Any thoughts
> on this issue, Mike?
>
> Christian

So I did a:

svn co svn://anonsvn.mono-project.com/source/trunk/gtk-sharp

And checked out the code:

	public Hashtable Data {
		get {
			if (data == null)
				data = new Hashtable ();
			return data;
		}
	}

There are no attributes on it and this implementation is a typical
approach. I might prefer a Dictionary<of String, Object> return type,
but no worries.

Thanks for pointing this out.

-Chuck


More information about the Gtk-sharp-list mailing list