[Gtk-sharp-list] treeview problems (gtk# bug?)
Shane Hyde
shane@enactive.org
Mon, 07 Jul 2003 23:28:21 +1000
Interestingly, that original sample does not even run on .NET, it dies
with
Unhandled Exception: System.NullReferenceException: Object reference not
set to an instance of an object.
at Gtk.ListStore.gtk_list_store_set_value(IntPtr raw, TreeIter& iter,
Int32 column, IntPtr value)
at Gtk.ListStore.SetValue(TreeIter iter, Int32 column, Value value)
in
C:\cygwin\home\Shane\build\cvs\gtk-sharp\gtk\generated\ListStore.cs:line 126
at Gtk.ListStore.AppendValues(Array values) in
C:\cygwin\home\Shane\build\cvs\gtk-sharp\gtk\generated\ListStore.custom:line
76
at Gtk.ListStore.AppendValues(Object[] values) in
C:\cygwin\home\Shane\build\cvs\gtk-sharp\gtk\generated\ListStore.custom:line
86
at GtkSamples.TreeViewDemo.PopulateStore() in
C:\cygwin\home\Shane\build\cvs\gtk-sharp\sample\ManagedTreeViewDemo.cs:line
32
at GtkSamples.TreeViewDemo.Main(String[] args) in
C:\cygwin\home\Shane\build\cvs\gtk-sharp\sample\ManagedTreeViewDemo.cs:line
53
in
public void SetValue(Gtk.TreeIter iter, int column, GLib.Value
value) {
gtk_list_store_set_value(Handle, ref iter, column,
value.Handle);
}
Shane
Erik Bågfors wrote:
>Hello!
>
>I have a small program which uses two treeviews. The views are done in
>very much the same way as ManagedTreeViewDemo.cs that comes with
>gtk-sharp.
>
>The problem is that at first the treeviews looks great but as I try to
>use them by moving around in them and between them the cells in them
>suddenly have the same text in them.
>
>So I tried to add another treeview to the ManagedTreeViewDemo and get
>the same problem there. As you can see in treeviewok.png the rows under
>"Two" are "foo", "bar", "baz", "quux". If you look in treeviewwrong.png
>you see that they are all "quux". All I did was move around in the
>treeviews. You can see the same thing under "Three".
>
>I attached a diff to ManagedTreeViewDemo.cs that shows this behavior.
>
>I can't see how I would be doing anything wrong in this case so I
>suspect a gtk# bug.
>
>I'm running with the following rpms on a mandrake system.
>
>mono-0.25-1.ximian.6.1
>mono-devel-0.25-1.ximian.6.1
>mono-debuginfo-0.24-1
>gtk-sharp-0.10-1.ximian.6.1
>gtk-sharp-gapi-0.10-1.ximian.6.1
>monodoc-0.5-1.ximian.6.1
>
>Keep up the good work!
>
>/Erik
>
>
>
>