[Gtk-sharp-list] Design for Indexer for GLib.List to allow []
based addressing.
Joe Shaw
joe@ximian.com
Thu, 23 Oct 2003 17:39:16 -0400
This isn't really related to your patch directly, but since you're in
that code... :)
> GLib.List l = new GLib.List ((IntPtr) 0, typeof (Gtk.Widget));
> GLib.SList sl = new GLib.SList ((IntPtr) 0, typeof (Gtk.Widget));
This is a pretty nasty API. Maybe we should add another constructor
which just takes the type?
Ie, add a:
internal ListBase (System.Type element_type)
{
this.element_type = element_type;
}
to ListBase.cs and then suitable ctors to List.cs and SList.cs.
Then you could do:
GList.List l = new GLib.List (typeof (Gtk.Widget));
which offends my delicate sensibilities less.
Joe