Hi,

I'm writing my first Gtk# program, and I'm having a problem with an event handler.

I have this code for the event handler:

private void windowFocusMoved(object o, EventArgs args)
        {
                statusbar.Pop();
        }

Now I try to attach the event handler to an event like this:

this.MoveFocus += new EventHandler(windowFocusMoved);

When I run this code, I get this error message from Monodevelop:

Type=Error, Description=Operator `+' cannot be applied to operands of type `Gtk.Window.MoveFocus' and `System.EventHandler'(CS0019)

I'm really puzzled about this error message. I certainly don't try to apply the '+' operator, but the '+=' operator, at that should be the correct way to do it, I suppose.

Best regards,

Finn Gruwier Larsen
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to