PDA

View Full Version : Problems with inheritance a ListStore, Gtk#


Get
June 19th, 2005, 04:57 AM
Hi!


I try to inheritance a ListStore inte my own class. I found out that I need to set the Columntypes with the SetColumnTypes function, but when I do that, I get error about "No overload for method `SetColumnTypes' takes `2' arguments(CS1501)". What have I made wrong?


using Gtk;
using System;
using GLib;

public class WordList : Gtk.ListStore {

/* Some code */

public WordList (string language1, string language2)
{
SetColumnTypes(typeof(string), typeof(string));


}

/*Some more code */

}

born_confused
June 21st, 2005, 11:12 AM
meaning there isnt an overload method that takes those parameters

EDIT: arent you supposed to use some keyword, such as super? rather than call the method, having a look at mono doc shows

the constructors take in either Glib.Gtype[] System.types where as set columntypes only takes in Glib.Gtypes

Get
June 22nd, 2005, 02:30 AM
meaning there isnt an overload method that takes those parameters

EDIT: arent you supposed to use some keyword, such as super? rather than call the method, having a look at mono doc shows

the constructors take in either Glib.Gtype[] System.types where as set columntypes only takes in Glib.Gtypes
Thx

Sloved it with this.ColumnTypes = new GType[]{GType.String, GType.String};