[Gtk-sharp-list] Treeview question (controlling the model using a TreeModel)

Michael Hutchinson m.j.hutchinson at gmail.com
Mon Dec 31 10:29:22 EST 2007


On Dec 30, 2007 6:01 PM, Paul Bourke <pauldbourke at gmail.com> wrote:
...
> System.InvalidCastException: Cannot cast from source type to destination type.
>   at GRapid.MainWindow.RenderURLColumn (Gtk.TreeViewColumn column,
...
> TreeStore myTreeStore = new TreeStore (typeof(string), typeof (MyClass));
...
The two store columns have type string and MyClass,

>     DownloadItem d = (DownloadItem) model.GetValue (iter, 0);

but you're trying to cast the string to a DownloadItem.

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Gtk-sharp-list mailing list