xsharp.eu • Questions about class definitions in the Visual FoxPro dialect - Page 2
Page 2 of 2

Re: Questions about class definitions in the Visual FoxPro dialect

Posted: Mon May 13, 2024 10:09 am
by xinjie
Hi, Robert

Thanks for the reply!

Can I know the release schedule for VFP compatible forms?
robert wrote: Mon May 13, 2024 9:46 am Xinjie,

Ok, I see. You are referring to the specific events for VFP forms.
Our implementation of the VFP compatible forms, which is based on Windows Forms, also calls these event handlers, and we have tried to call them in the same order as VFP. I am sure that there are places where we got it wrong. We'll have to correct those.

The mechanism that we are using may look a bit strange, but the Windows Forms event handlers are expected to have a certain signature. For example the Click event of a control needs to have an object parameter and an EventArgs parameter and a return type of void.
Click Event handlers in FoxPro code have no parameters and an undefined return type. We register an event handler with the proper signature and call the VFP compatible from there.
Another difference is that in VFP the event handlers appear to be at the control level, where .Net has all these events at the form level.

Fabrice can explain this all when needed.

Robert

Re: Questions about class definitions in the Visual FoxPro dialect

Posted: Mon May 13, 2024 11:08 am
by robert
Xinje,
That library is included with X# 2.20 that should be released in the coming week(s).

Robert

Re: Questions about class definitions in the Visual FoxPro dialect

Posted: Mon May 13, 2024 11:14 am
by xinjie
Robert,

Exciting good news, very good!
robert wrote: Mon May 13, 2024 11:08 am Xinje,
That library is included with X# 2.20 that should be released in the coming week(s).

Robert

Re: Questions about class definitions in the Visual FoxPro dialect

Posted: Mon May 13, 2024 1:40 pm
by Fabrice
Hi xinje,

I see that you have some interests and certainly a best knowledge of VFP that me ! :)

As Robert, told you, I've created a VFPXPorter application that read VFP Projects & Forms, create/move/exporter hte VFP code to an X# project.

Forms and Event are moved to something that X# (and .NET) can understand an handle.
All this in contained in a library that does the glue between these two worlds.
I also have create new controls that are .NET-based but worked a bit like their VFP counterparts.

This library still needs a lot of developement (Grid is the biggest example), but it's a start.

As the whole X# project, this library and the XPorter are already available on github :
https://github.com/X-Sharp/XSharpPublic ... VFPXPorter

I would be very happy to work on this with you ;)

All the best,
Fab

Re: Questions about class definitions in the Visual FoxPro dialect

Posted: Mon May 13, 2024 2:22 pm
by xinjie
Fabrice

I've been learning foxbase since the mid-1990s, and I didn't understand object orientation until the millennium. about 20 years ago, when I started learning VFP from 0. However, I didn't work as a programmer until only a few years ago.

I've been thinking about VFPXPorter ever since I saw it at the VFF conference. My technical skills are limited to VFP, I'll do my best if I can help you.

I look forward to VFPXPorter being installed on every X# user's PC, it is, I think, no less than the US atomic bomb experiment at Bikini Island for programmers using VFP.

Re: Questions about class definitions in the Visual FoxPro dialect

Posted: Mon May 13, 2024 2:25 pm
by xinjie
To add, in my personal opinion, the Grid is the weirdest control in VFP.