[Mono-list] Problems with delegates (Qt#)

Marcus mathpup@mylinuxisp.com
Mon, 30 Dec 2002 17:56:55 -0600


Qt# is having major problems involving delegates. Essentially, we are creating 
delegates for C# instances/methods (since a delegate for an instance 
encapsulates both the instance and the method), and we are passing the 
delegate to unmanaged code. The unmanaged code is supposed to invoke the 
delegate at the appropriate time.

Under Mono, delegates with no parameters (e.g. void quit() ) work, but 
delegates that take an int, for example (e.g. void display(int) ), are never 
called.

The same problems occurs when using mint or mono, and it does not matter 
whether the code is compiled with mcs or csc. Interestingly, the same code 
does work correctly under Portable.NET.

I really do not know what to do at this point. I have spent hours and hours 
trying to figure out why this isn't working. It's seems as though the runtime 
is not allowed the unmanaged code to invoke the managed code.