[Mono-list] Fix for GTK# TreeStore

Daniel Morgan danmorg@sc.rr.com
Sun, 17 Nov 2002 20:35:06 -0500


By the way,  I just looked at GTK# gtk/TreeStore.cs, and SetColumnTypes is
wrong too.
Is this okay?

From:
static extern void gtk_tree_store_set_column_types(IntPtr raw, int
n_columns, int types);

public void SetColumnTypes(int n_columns, int types) {
	gtk_tree_store_set_column_types(Handle, n_columns, types);
}

To:
static extern void gtk_tree_store_set_column_types (IntPtr raw, int
n_columns, int[] types);

public void SetColumnTypes (int[] types) {
	gtk_tree_store_set_column_types (Handle, types.Length, types);
}

-----Original Message-----
From: Daniel Morgan [mailto:danmorg@sc.rr.com]
Sent: Friday, November 15, 2002 2:57 PM
To: Mono-List
Subject: Fix for GTK# ListStore


Can someone fix the gtk generated class ListStore in gtk# for me please?

From:
static extern void gtk_list_store_set_column_types(IntPtr raw, int
n_columns, int types);

public void SetColumnTypes(int n_columns, int types) {
	gtk_list_store_set_column_types(Handle, n_columns, types);
}

To:
static extern void gtk_list_store_set_column_types (IntPtr raw, int
n_columns, int[] types);

public void SetColumnTypes (int[] types) {
	gtk_list_store_set_column_types (Handle, types.Length, types);
}

Also, there should be a constructor for ListStore that allows an array ints.
For instance:
ListStore store = ListStore (types);

		public ListStore(int[] types)
		{
			Raw = gtk_list_store_newv(types.Length, types);
		}

Currently, there is something like:

		public ListStore(params int[] types)
		{
			Raw = gtk_list_store_newv(types.Length, types);
		}

I don't know if that would interfere with the constructor I am interested in
having.

Thanks,
Daniel