[Gtk-sharp-list] problems with RowActivvated event (TreeView)
Aleksey Sanin
aleksey@aleksey.com
Thu, 31 Jul 2003 18:13:46 -0700
This is a multi-part message in MIME format.
--------------030208030503000102020603
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi, All!
I run into some problems with using RowActivated event
for TreeView. Basicaly, if I install *any* RowActivated event
callback then application crashes after 3-4 double clicks on
the tree. As an example, I have attached a diff that adds
RowActivated event callback to the gtk-sharp/sample/TreeViewDemo.cs
application.
I found only one reference to RowActivated events thru google:
http://lists.ximian.com/archives/public/gtk-sharp-list/2003-February/001122.html
and I am doing exactly the same thing as suggested. I wonder
if this is some trivial (or not trivial :) ) problem in my code or
this is a known issue with a known workaround :)
Thanks,
Aleksey
--------------030208030503000102020603
Content-Type: text/plain;
name="TreeViewDemo.cs.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="TreeViewDemo.cs.diff"
Index: TreeViewDemo.cs
===================================================================
RCS file: /mono/gtk-sharp/sample/TreeViewDemo.cs,v
retrieving revision 1.8
diff -u -r1.8 TreeViewDemo.cs
--- TreeViewDemo.cs 22 Jul 2003 23:58:07 -0000 1.8
+++ TreeViewDemo.cs 1 Aug 2003 01:08:06 -0000
@@ -31,6 +31,7 @@
TreeView tv = new TreeView (store);
tv.HeadersVisible = true;
+ tv.RowActivated += new RowActivatedHandler (on_row_activated_cb);
tv.AppendColumn ("Name", new CellRendererText (), "text", 0);
tv.AppendColumn ("Type", new CellRendererText (), "text", 1);
@@ -43,6 +44,11 @@
win.ShowAll ();
Application.Run ();
+ }
+
+ void on_row_activated_cb (object o, RowActivatedArgs args)
+ {
+ Console.WriteLine ("on_row_activated_cb");
}
private static void ProcessType (TreeIter parent, System.Type t)
--------------030208030503000102020603--