fbpx
Welcome, Guest
Username: Password: Remember me
This public forum is meant for questions and discussions about Visual FoxPro

TOPIC: FoxPro function list updated

FoxPro function list updated 3 months 4 weeks ago #12125

  robert's Avatar Topic Author robert Offline Posts: 1542
We have updated the "compatibility" list for FoxPro with a list of functions.
See here: www.xsharp.info/itm-help/foxpro-compatibility-list

We differentiate between:
1) Functions that are already completely supported
2) Functions that are supported differently (with more or less parameters)
3) Functions that are not supported yet
4) Functions that will not be supported

In the last category are functions such as:
- Functions that have to do with the FoxPro IDE
- Functions that have to do with the FoxPro UI system (Window and Menu related)
- Functions that have to do with DDE
- Functions that have to do with the way FoxPro implements COM
- Functions related to the FoxPro way of error handling (ON Error ....)

If you think we made a mistake in this list and a function that you must have is not included, then please report that here. Most likely there is an alternative in .Net.
Some of the functions are UI related, such as MessageBox(), GetFont() and GetPict().
We will implement these on top of the Windows Forms classes.
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

FoxPro function list updated 3 months 3 weeks ago #12132

  FoxProMatt's Avatar FoxProMatt Away Posts: 347
Robert - thank you for working on this list.

I think it would be easier to digest these if you separated "Database and Workarea commands" and the "Other Commands" into "NOT supported", "n/a" and "supported" groups similar to what you did on the "Functions" list. (See screenshots below).

I also suggest "Not Implemented" instead of "NOT supported". I think this phrase better indicates that it's in-process just not there yet.

Something like this:



And this:
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by FoxProMatt.

FoxPro function list updated 3 months 3 weeks ago #12152

  FoxProMatt's Avatar FoxProMatt Away Posts: 347
Johan posted a link to this info on Leafe email list, and I'm posting one reply from that list to show feedback from another FoxPro user:
.

The one that caught my eye is SCATTER/GATHER not (yet) supported. I use those commands in everything I do in my VFP apps, especially in single record Add/Edit screens. My objects have a controlsource like "Thisform.oRecord.MyField" which gets populated via something like:


DO FORM frmEditRecord NAME loFrm NOSHOW
SELECT MyTable
SCATTER MEMO NAME loFrm.oRecord
loFrm.Show()

IF loFrm.lSaveChanges THEN
    thisform.obiz.UpdateRecord(loFrm.oRecord)
ENDIF

IF VARTYPE(loFrm) = "O" THEN
    loFrm.release()
ENDIF 

Please Log in or Create an account to join the conversation.

Last edit: by FoxProMatt.

FoxPro function list updated 3 months 3 weeks ago #12183

  Kevin Clark's Avatar Kevin Clark Offline Posts: 47
I think the Foxpro toolkit for .NET has been mentioned on this forum before. Looking at that versus the list of currently unsupported Foxpro functions, I'd guess that at least 50 of the functions are supported in the toolkit. The toolkit is public domain so it might be a good resource for getting those functions into X#.

Please Log in or Create an account to join the conversation.

FoxPro function list updated 3 months 3 weeks ago #12185

  FoxProMatt's Avatar FoxProMatt Away Posts: 347

Please Log in or Create an account to join the conversation.

FoxPro function list updated 3 months 3 weeks ago #12187

  robert's Avatar Topic Author robert Offline Posts: 1542
Kevin, Matt,
We are aware of this toolkit. For the upcoming build we have focused on getting the FoxPro support for Alias.FieldName to work (and to make sure that we can distinguish between Variable.Property and Alias.FieldName) and some issues w.r.t. passing values by reference.
This build should be released to the subscribers in a few days.

After that I expect that we can added support to several of the commands that we don't support yet (SCATTER and GATHER) for example and the support code for these commands.
We'll also work on the various runtime functions and will try to add support for cursors based on SQL statements.
And we continue our work on the Form converter.

Embedded SQL is a different thing. We will discuss that in our meeting in Athens in the 2nd week of January.

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

FoxPro function list updated 3 months 3 weeks ago #12188

  FoxProMatt's Avatar FoxProMatt Away Posts: 347
Robert - what is "... our meeting in Athens in the 2nd week of January."

Please Log in or Create an account to join the conversation.

FoxPro function list updated 3 months 3 weeks ago #12189

  FoxProMatt's Avatar FoxProMatt Away Posts: 347
Robert - when it comes to the Runtime Functions... I really wish there was a way the community could be involved, if not responsible, for bringing in this layer of X#.VFP.

If you could set a best-practices example of how to implement a missing Function, and then people in the X#.VFP community could write the code for it and submit a pull request to implement it. Make them do some of the work instead of belly-aching at you about missing functions! One thing that does make this less than optimal is that while you may know which functions can just be wrappers around existing X# stuff, whereas someone not familiar with X# will come in and do a full implementation on a function from scratch, and miss that opportunity to take advantage of existing X# pieces.

Regardless, if VFP community got involved in any real way, it could be very beneficial long term and it would allow this X#.VFP to progress a little more rapidly as it would allow the X# Team to focus on much more important low level things like the elephants in the room (Native FoxPro SQL support, SqlExec(), Scatter/Gather, Reports, Form conversion).

Please Log in or Create an account to join the conversation.

FoxPro function list updated 3 months 3 weeks ago #12190

  Chris's Avatar Chris Away Posts: 1754

FoxProMatt_MattSlay wrote: Robert - what is "... our meeting in Athens in the 2nd week of January."


It's customary, every year about that time of the year (and often a couple other times per year as well) for our team (or at least as many of us can make it) to meet in person for some drin...errr I mean for some productive discussions, hand on work on various X# aspects etc. Actually (seriously) during one of those meetings we managed to get for the first time the complete VO SDK to compile and work properly in X#, which was a major milestone.

Here's a pic from our first meeting in Athens in 2016 (wow, it really feels like it was a lot longer ago, so many things happened since then!): www.xsharp.info/articles/blog/best-wishes-for-2016
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

FoxPro function list updated 3 months 3 weeks ago #12191

  wriedmann's Avatar wriedmann Offline Posts: 2206
Hi Matt,

... our meeting in Athens in the 2nd week of January


given the fact that 2 of the 4 team members are Greek, this makes absolutely sense. And in January the weather in Greece is normally better than in the Netherlands and in France - so this makes such a meeting more interesting.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy

www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

FoxPro function list updated 3 months 3 weeks ago #12192

  robert's Avatar Topic Author robert Offline Posts: 1542
Matt,

You'll be able to contribute in a few weeks. After finishing the current build I will add function prototypes for all the functions from the list to the source and I will also create a xml file for the documentation of these functions.
I'll write a small tool to extract the documentation from the VFPX help project (will give them credits of course) so we can fill the help fairly quickly.
After that you can start filling in functions, either by copying the implementation from the toolkit or by writing it yourself.

Please give me a few weeks (let's say Jan 1st) to set this up.

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

FoxPro function list updated 3 months 3 weeks ago #12193

  FoxProMatt's Avatar FoxProMatt Away Posts: 347
Robert - this is GREAT news. The run time functions are the most trivial part of this, and once you've laid the framework in place for this to unfold, I think it is fair to make at least a few community people get on board to help out in this area so you gurus can work on the really hard parts.

Once you make give the word, I'll tackle one or two myself, and then after we get a cycle under our belt from that exercise, we can decide how wide we want to cast the net to see if one or two others are needed to join this task. I'd love to tackle as much of them as possible myself, but I'd also like to see a couple of other VFP folks get involved at this level too.

Please Log in or Create an account to join the conversation.

FoxPro function list updated 3 months 3 weeks ago #12203

  mainhatten's Avatar mainhatten Offline Posts: 108

robert wrote: Matt,

You'll be able to contribute in a few weeks. After finishing the current build I will add function prototypes for all the functions from the list to the source and I will also create a xml file for the documentation of these functions.
I'll write a small tool to extract the documentation from the VFPX help project (will give them credits of course) so we can fill the help fairly quickly.
After that you can start filling in functions, either by copying the implementation from the toolkit or by writing it yourself.

Please give me a few weeks (let's say Jan 1st) to set this up.

Hi Robert,
few things from my side. The implementation of vfp is not always in sync with the vfp docs - I think xSharp.vfp should target the behavior of vfp9 SP2 and reflect true behavior implemented in new docs as addition.
Also more than a hint on what the ideal implementing looks like.would be helpful. My own idea is that code in dialects should best be built upon code already in core, to keep code DRY and runtimes small. In some cases like the just*, force* functions it might be best to move them into core and base further, more complicated functions upon them, .
I have also looked at the Dotnet kit - maybe my dumb luck, but very first mini function had erroneous implementation.Also: are you planning for a test suite based on a function table with test code or wait for users to find differences?
Not as much fun as coding, but necessary if others not knowing the conventions probably automatic in your group start adding to vfp dialect.
my 0.02€
thomas
P. S. DBC events missing currently in the list - should be at the far end to be implemented, but listed. Even better would be a single event implemented as example as soon as DBC is accessible, so that in case another event is needed, one can follow the lead.

Please Log in or Create an account to join the conversation.

Last edit: by mainhatten.

FoxPro function list updated 3 months 3 weeks ago #12205

  mainhatten's Avatar mainhatten Offline Posts: 108
Robert,
both execscript and compile are both listed as not targeted.
Generating code snippets or copying/concatenating memo fields is not that uncommon in vfp apps. I thought Rosslyn supports compile as service - ability to add such snippets in runtime is nice, for instance to deploy rule engines configuring themselves or after user input. Doable in pure compiled code as well, but more elegant if not pre-creating all possible permutations.
regards
thomas

Please Log in or Create an account to join the conversation.

Last edit: by mainhatten.

FoxPro function list updated 3 months 3 weeks ago #12208

  robert's Avatar Topic Author robert Offline Posts: 1542
Thomas,
You are right, Roslyn provides that. We also have "X# Sscript" support, but the scripting does not support dialects yet (so it runs in pure X# Core).
I'll discuss with Nikos if we can add dialect support in the scripting engine. When we can then we can certainly support compile() and execscript().

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

FoxPro function list updated 3 months 3 weeks ago #12209

  robert's Avatar Topic Author robert Offline Posts: 1542
Thomas,
If the behavior of VFP differs from the docs, then we most certainly need support from VFP experts.
I did not include DBC in the list at all. Of course we want to support that, and DBC events are part of that.
But we'll probably need some help from VFP experts in this area as well.
And yes, we plan a test suite.

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

Last edit: by robert.

FoxPro function list updated 3 months 3 weeks ago #12212

  FoxProMatt's Avatar FoxProMatt Away Posts: 347
Robert - any idea when you will experiment with proof-of-concept/approach to native VFP SQL with Join and Where clauses?

Plus, the Rushmore optimization aspect of native SQL Queries.

Example:
.
Select Jobs.JobNo,
       JobItems.Qty,
       Parts.PartNo,
       Parts.Description
From Jobs
     Join JobItems On JobItems.job_id = Jobs.id
     Join Parts On JobItems.part_id = Parts.id
Where Jobs.Status = 'A'
       And Parts.TypicalProductionQty > 10

Remember, in FoxPro, these DBFs do not have to be open first... If there is no Alias already alive with these table names, VFP will do a USE to open the DBFs, and leave them open.

If no "INTO CURSOR" statement is included in the query, then the result of this query will live in a new work area named 'Query' and it will be the currently selected Work Area. The DBFs are left as USED in the environment, even if they were not opened beforehand.

Please Log in or Create an account to join the conversation.

Last edit: by FoxProMatt.

FoxPro function list updated 3 months 2 weeks ago #12213

  robert's Avatar Topic Author robert Offline Posts: 1542
Matt,
I have an idea but I am not ready to share that yet. I don't want to raise expectations that I can't fulfill.

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

FoxPro function list updated 3 months 2 weeks ago #12215

  mainhatten's Avatar mainhatten Offline Posts: 108

robert wrote: You are right, Roslyn provides that. We also have "X# Sscript" support, but the scripting does not support dialects yet (so it runs in pure X# Core).
I'll discuss with Nikos if we can add dialect support in the scripting engine. When we can then we can certainly support compile() and execscript().

Hi Robert,
thx for quick confirm of basic possibility.
When you meet in Athens to discuss progress path to take implementing next features, please try to get away from current near-binary scale of supported(perhaps with different parameters) to a scale reflecting support status (perhaps asking for testing of specifics) and guesstimate of priority if not already supported. I am NOT asking for a detailed function-after-function plan, only groupings you will go at as milestone definitions for example
- Buffering-Tableupdate (pretty please ;-)
- Class definitions
- GUI
- Report
and so on. Gives a better picture to us and option to implement stop-gap patches ourselves if we foresee a need and such groupings should be easy to add to a certain table describing language elements.

regards
thomas

Please Log in or Create an account to join the conversation.

FoxPro function list updated 3 months 2 weeks ago #12216

  mainhatten's Avatar mainhatten Offline Posts: 108

robert wrote: If the behavior of VFP differs from the docs, then we most certainly need support from VFP experts.

Nothing earth-shattering, but a few edge cases not touched in docs as they are written to be read, not used as implementation guide and known to us by expirience. Fine-tuning to be done when the functions are all done - then we can ask for effort over at "our" watering grounds to sieve out the things Matt, Antonio, Dragan and the other vfp-ers already testing the waters here missed.

I did not include DBC in the list at all. Of course we want to support that, and DBC events are part of that.
But we'll probably need some help from VFP experts in this area as well.

DBC is needed early on for long field names. RI support also in DBC as standard, but many skip RI via DBC as it is not elegant.Field captions and validations sometimes used. DBC events I used only seldom - most of the times to do things declared impossible by others...

And yes, we plan a test suite.

Good. Currently fun to play with xSharp, but not efficient use of time ;-)

regards
thomas

Please Log in or Create an account to join the conversation.

Last edit: by mainhatten.