[Mono-list] late linking & dynamic invocation ...

Miguel de Icaza miguel@ximian.com
05 Jul 2002 14:31:16 -0400

> 	Ok - the problem is quite simple. In order to reasonably disambiguate
> the 'DelegateName' you need to mangle the types into the delegate name,
> in a signal handling system there will be a lot of these, thus:
> 	new DelegateName (fn) -> new DelegateLongIntShortString 
> 				(my_long_int_short_string_method);

Ah, I would never do it that way.  I would do it like this:

	delegate void SizeAllocation (long i, int j, string name);

The delegate name is chosen to have a semantic meaning, and not match
the method signature ;-)

> 	In short, it's the tragedy of this:
> 	Delegate *del = new DelegateLongIntShortString 
> 				(my_long_int_short_string_method);
> 	I want to be able to do:
> 	Delegate *del = new Delegate (my_long_int_short_string_method);

I do not think we are on the same page, here is how it *actually* works
on gtk#:

               win.DeleteEvent += new EventHandler (Window_Delete);

Notice that the delegate signature is `EventHandler', not
DelegateObjectEventArgs ;-)