Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any good tool for converting FoxPro DOS to VFP?
Message
From
20/11/2006 11:53:48
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01171094
Message ID:
01171208
Views:
7
>>Hi all,
>>do you know any good conversion tool for converting Screen objects from FoxPro DOS 2.6 to the new Form objects in VFP 6/7/8/9 version?
>
>You are aware of the native conversion tool? If the screen is of type fp2.6, vfp itself will offer a conversion. My impression is that this conversion tool is okay if the original screen is 'simple'.

It's not OK and it never was. It gives you a form in Read emulation mode, which only uses regular textboxes etc to simulate the 2.x behavior. It still has all the terminate read etc stuff in it, and you can't get it to behave like a real VFP form. Actually, the converted form

- doesn't have a title bar (!)
- textboxes are flat (in case of so-called "functional" conversion)
- has a page on a pageframe on a form in a formset (!) - IMO, the use of formsets is enough for me to never try this sort of conversion
- border style is 2-fixed dialog
- the background color source is 5 (window colors as defined by control panel) instead of 4 (3d objects as defined by control panel)
- the labels' background colors are set to 3-default scheme (and schemes are strictly a FPD thing, leftover from character mode) instead of 4-windows colors. They could at least be transparent, that'd make it easier.
- the "visual" conversion doesn't bring your code over. Now I know what they meant :).
- the layout has many labels overlapping with textboxes if you use any font other than the default - obviously, txtwidth() wasn't extensively used.

>Do you want an example of a complicating factor? I always used the #NAME directive, in order to create sensible snippet names. The conversion tool does NOT know how to deal with that directive and the consequence is that conversion is a pain in the *ss, for this fact alone.

That's sort of natural. As any Swiss army knife, it's perfect for cutting Swiss steaks and opening Swiss beer, but it may have a problem doing things it wasn't designed for. And the #NAME directive is exactly where it falls short - apart from the fact that you don't get real VFP forms.

>Another point, also implicitly made by Mike Yearwood, is that OO-principles require a fresh design, rather than a conversion.

It depends on how you convert. Now that I have more time, I've come back to my converter that I gave up years ago. It creates real VFP forms, ports the code into any framework (well, my framework for now - I need a conversion gig to try it on) and generally should switch the code into something very OOP - once we get rid of public variables :). And yes, it has none of the problems listed above... except the #name directive which I never used, but it shouldn't be too hard to add.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform