[Mono-list] late linking & dynamic invocation ...
05 Jul 2002 18:42:39 -0500
On Fri, 2002-07-05 at 16:33, Miguel de Icaza wrote:
> Michael, the example you show is a limitation on the Gtk# code
> generation, and has nothing to do with a limitation with the delegates.
> This is indeed ugly:
The code generator actually does *more* work than absolutely necessary
in order to accomplish this *ugliness*. It does it because this is the
.Net model for event propagation, and Gtk# is a .Net language binding.
I have heard so much grousing about the EventArgs usage from traditional
Gtk users that I'm considering reworking this, or accepting a patch to
fix it, but the reason it is done this way is to attempt to provide
consistency with the rest of the .Net class libraries.
> While the real signature should just be:
> void mySizeAllocateMethod (long i, long j, string name)
> But this is not a C#/.NET limitation, it is a binding-generation
I am already generating delegates with type specific signatures in order
to marshal the signals across from the native side. It would take less
effort to type the events with these less generic delegates than what is
currently being done. I'm just not certain that is the most appropriate
decision for the framework that Gtk# is trying to fit into.