[Gtk-sharp-list] Multiple EventArg types in one function.

George Farris george at gmsys.com
Fri Oct 27 00:17:11 EDT 2006


I have an application which used to work and now with updated gtk#
(Ubuntu Edgy) it fails.

Basically it was a signal handler like so:

on_tab_changed(Object o, EventArgs e)
{
	do stuff
}

It was a tab in a Notebook with an Entry widget and a Button widget
defined in Glade.  What I had was, anytime the Entry changed or the
Button was pressed it would call on_tab_changed.

The glade file defined "button_pressed_event" and "changed" event from
the two widgets.  All used to work fine but now the code crashes with a
glade.handlereventexception that says the EventArgs must be
ButtonPressedEventArgs.

Is there any way to restore the previous behaviour in gtk#.  I want
on_tab_changed to accept any type of event.

Thanks

-- 
George Farris
farrisg at shaw.ca

-- 
George Farris
farrisg at shaw.ca




More information about the Gtk-sharp-list mailing list