[Mono-list] late linking & dynamic invocation ...
Miguel de Icaza
05 Jul 2002 17:33:08 -0400
> > win.DeleteEvent += new EventHandler (Window_Delete);
> > Notice that the delegate signature is `EventHandler', not
> > DelegateObjectEventArgs ;-)
> Yes - but the 'EventHandler' signature blows - that's the whole point;
> the EventHandler forces you to do your own de-marshaling, in a horribly
> type un-friendly fashion; thus for eg. the above SizeAllocation you get
> to do:
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:
> void mySizeAllocateMethod (Object  args)
> long demarshal_i = args ;
> int demarshal_j = args ;
> string demarshal_name = args ;
> ... now we do the method ...
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