Questions about class definitions in the Visual FoxPro dialect

This forum is meant for questions about the Visual FoxPro Language support in X#.

User avatar
xinjie
Posts: 106
Joined: Wed May 20, 2020 10:05 am
Location: China
Contact:

Re: Questions about class definitions in the Visual FoxPro dialect

Post 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
简单的东西重复做,你能成为专家;重复的东西用心做,你能成为赢家!
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: Questions about class definitions in the Visual FoxPro dialect

Post by robert »

Xinje,
That library is included with X# 2.20 that should be released in the coming week(s).

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
xinjie
Posts: 106
Joined: Wed May 20, 2020 10:05 am
Location: China
Contact:

Re: Questions about class definitions in the Visual FoxPro dialect

Post 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
简单的东西重复做,你能成为专家;重复的东西用心做,你能成为赢家!
User avatar
Fabrice
Posts: 459
Joined: Thu Oct 08, 2015 7:47 am
Location: France

Re: Questions about class definitions in the Visual FoxPro dialect

Post 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
XSharp Development Team
fabrice(at)xsharp.eu
User avatar
xinjie
Posts: 106
Joined: Wed May 20, 2020 10:05 am
Location: China
Contact:

Re: Questions about class definitions in the Visual FoxPro dialect

Post 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.
简单的东西重复做,你能成为专家;重复的东西用心做,你能成为赢家!
User avatar
xinjie
Posts: 106
Joined: Wed May 20, 2020 10:05 am
Location: China
Contact:

Re: Questions about class definitions in the Visual FoxPro dialect

Post by xinjie »

To add, in my personal opinion, the Grid is the weirdest control in VFP.
简单的东西重复做,你能成为专家;重复的东西用心做,你能成为赢家!
Post Reply