error before install xsharp 26a1Public

We encourage new members to introduce themselves here. Get to know one another and share your interests.
Post Reply
jpmoschi
Posts: 77
Joined: Thu May 21, 2020 3:45 pm

error before install xsharp 26a1Public

Post by jpmoschi »

Hello Guys
I came back to continue evaluating XSharp from FoxPro user point of view.
I installed the last public version (the installer XSharpSetup26a1Public.zip)
When i try to compile my old tests integrating WinForm classes with XSharp I have the compile error below

Error XS1628 Cannot use ref, out, or in parameter 'message' inside an anonymous method, lambda expression, query expression, or local function

The code is inside the below test class. ¿Are there any sintax form change?

PUBLIC CLASS OFORM INHERIT System.Windows.Forms.Form
...
protected sealed method WndProc(message ref Message ) as void
super.WndProc(@message)
if message:Msg = 0x84 and message:Result = 0x1
message:Result:= 0x2
endif
end method
...

END CLASS


Project settings in attachmment
best regards
Juan
Attachments
xsharp settings.PNG
xsharp settings.PNG (27.15 KiB) Viewed 506 times
User avatar
Chris
Posts: 4854
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

error before install xsharp 26a1Public

Post by Chris »

Hi Juan,

That's strange, I do not see a problem with this code. Are you sure the error is reported for one of those lines? Can you please zip and send the solution so we can have a look?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
jpmoschi
Posts: 77
Joined: Thu May 21, 2020 3:45 pm

error before install xsharp 26a1Public

Post by jpmoschi »

sure, the attachment is a rar file with password: xsharp

To run the test, I could send you a litle database script
thanks

pd: Fabrice i discovered your video about the vfp xporter and a file inside the solution resolve the FoxPro powerfull controls with WinForm. I recomend you a little view.
thanks again
Attachments
WindowsFormsApplication1.Rar
(521.09 KiB) Downloaded 79 times
User avatar
Chris
Posts: 4854
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

error before install xsharp 26a1Public

Post by Chris »

Juan Pablo,

Thanks a lot for the sample, I could reproduce the problem and logged it to be fixed: https://github.com/X-Sharp/XSharpPublic/issues/519

Problem is related to the /fox2 (Locals visible to macrocompiler) compiler option (it's the second to last option in the properties window in your screenshot). I think this is non needed in this particular code, so for a quick workaround, you can just disable this option for this project.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply