On Thu, 2006-03-16 at 22:13 +0100, Finn Gruwier Larsen wrote:
> 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)

MoveFocus is defined as:

public event Gtk.MoveFocusHandler MoveFocus

You need to attach a delegate of that type.

-- 
Mike Kestner <[EMAIL PROTECTED]>

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

Reply via email to