On Wed, Nov 25, 2009 at 9:21 PM, Chuck Esterbrook <[email protected]> wrote: > Hi, > > I'd like to associate an arbitrary Mono/.NET object with a widget.
After more digging, I found out that this feature was apparently considered useful enough that it was moved up from gtk_object to g_object, in the core C libraries. Here is some of the C API: http://www.gtk.org/api/2.6/gobject/gobject-The-Base-Object-Type.html#g-object-get-data But unfortunately, it doesn't really survive the Mono/.NET threshold as there are apparently garbage collection problems with it: http://www.go-mono.com/docs/index.aspx?link=P%3aGLib.Object.Data Although I'm not sure why a UserData for the Mono/.NET object itself could not have been provided. It would not be "seen" by any C-based code, but it wouldn't typically be used for such a purpose anyway. Are the hash codes for GLib.Object and descendants stable so they can always be safely used as keys in a dictionary? -Chuck _______________________________________________ Gtk-sharp-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
