[Mono-list] glade signal connections
Rob Brown-Bayliss
rbb@orcon.net.nz
Tue, 31 Aug 2004 20:38:55 +1200
On Tue, 2004-08-31 at 16:51, Peter Williams wrote:
> Do you just mean that you want to manually connect to a signal? Gtk#
> wraps signals as events and you can treat them pretty much as you would
> any other event:
>
> Gtk.Window window = whatever ();
> window.DestroyEvent += new DestroyEventHandler (myfunction);
If I do this:
tree_view.RowActivated += new EventHandler (row_activated);
I get this error:
Operator + cannot be applied to operands of type
`Gtk.RowActivatedHandler' and `System.EventHandler'(CS0019)
if I do this instead:
tree_view.RowActivated = new EventHandler (row_activated);
I get this,
The event 'RowActivated' can only appear on the left-side of a += or -=
(except when used from within the type 'Gtk.TreeView')(CS0070)
tree_view is defined as:
Gtk.TreeView tree_view = gxml.GetWidget("main_list") as Gtk.TreeView;
finally row_activated is:
private void row_activated(object o, EventArgs args)
{
Console.WriteLine(o.ToString(), args.ToString());
}
Can any one tell me where I am going wrong please?
--
Rob Brown-Bayliss
________________________________________________________________________
________________________________________________________________________