[Gtk-sharp-list] autoconnection of signals in glade

Miguel de Icaza miguel@ximian.com
05 Sep 2002 18:40:47 -0400

Hello Ricardo!

>     After learning enough about reflection, I have implemented signal
> autoconnection for libglade. Attached is the patch and added files of
> this implementation. Look at the test program to see how easy is to use
> this.

This patch is very nice.  I like a lot the result.  

I find it funny that the result is a lot better than using Microsoft
tools to design GUIs ;-)

>     - Mapping from glib signal names (like "enter") to Gtk# event names
>     (like "Entered"). To solve this, I have had to modify Gtk# code
>     generation to add a custom attribute to the generated events. The
>     attribute marks all events generated from glib signals, and stores
>     the original name (cname). This is the cleaner way that I could
>     think of doing this.

I think that this is a very clean approach.

>     - I have implemented the case when the handler object is specified
>     in the glade file, but I think it is totally useless because
>     signatures of handler methods have to match exactly (unlike in C).


>     - I'm not sure of what to do when no signal handler is found. Should
>     this throw an exception? For now it just shows a message...

Throwing an exception seems like the right thing to do.