[Gtk-sharp-list] glade# cross platform

Miguel de Icaza miguel@ximian.com
10 Aug 2003 12:08:08 -0400

> The libglade callback for autoconnecting signal handlers doesn't use
> this convention, so .NET users might encounter strange behavior --
> I've noticed that either not all handlers are actually connected or
> you'll get NullReference exception from gtk_main().  It's a stack
> corruption so the behavior is undefined.

Ah!  thanks for tracking this problem.   This is the first time I see an
explanation to the problem.

> Unfortunately, this breaks on mono windows.  So I currently have two
> versions of libglade -- one with the above modification that I place
> in the executable directory of a .NET application, the other in the
> windows PATH which is picked up by mono.
> This is not an issue with  Linux.  I haven't come up with good
> permanent approach to this problem.  Can anyone else confirm this ? 
> If so, any solutions ?

I think we should use the ilasm "trampoline", like it is done in
System.Drawing for talking to the PNG libraries in a portable way.

I know that Rotor did with their GUI toolkit a trick where they would
disassemble the compiled code, run a script to add the missing attribute
(which sadly, can not be flagged from C#) and then re-assembled.

Am CC-ing Jackson, the in-house ILASM expert.