[Gtk-sharp-list] Getting selection for a NodeStore

Ecmel Ercan ecmel@ercansoy.com
Tue, 27 Jan 2004 19:48:06 +0200


Hi,

I am trying to get the selected node for a TreeView with a NodeStore. (The
selection mode is single)

TreeIter iter;
TreeModel model;
view.Selection.GetSelected (out model, out iter);

The result is:

Unhandled Exception: System.InvalidCastException: Cannot cast from source type to destination type
in <0x0006e> Gtk.TreeSelection:GetSelected (Gtk.TreeModel&,Gtk.TreeIter&)


Does anybody know how to obtain the selected row for a NodeStore?

Best Regards

Ecmel