"No method w/ matching delegate signature" Error in Island C# Sample Code

I was just going through some of the sample code. The ‘RemObjects Oxygene for Island > GUI > Basic Windows GUI App’ ran as expected in Water (latest version).

But the identical project in C# returned an error “No method w/ matching delegate signature”. I looked over the Oxygene and C# source code and they both look essentially identical besides of course the syntactical differences.

C# Project located in: RemObjects C# for Island > GUI > Basic Windows GUI App

Maybe someone else can confirm? Cheers :wink:

Does pre-pending an & in C# to explicitly specify thew “address of this method” operation fix the error? if so, this might be a compile regression, or it might be a big with the sample, I’ll check with he compiler team on that…

It doesn’t’ but changing the signature to

        static LRESULT WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)

does fix it. by guess is this sample was never tested on x86_64, as the old sig (int) is fine on i386, but result is 64-bit on x86_64. The Oxygene version of the sample had the right result type:

class method WndProc(hWnd: HWND; message: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT;

I’ll commit the fixed sample for vNext.

1 Like

Awesome sauce! :nerd_face::+1:

1 Like