Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New migrator for FPD to VFP
Message
From
18/10/1998 19:16:21
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
17/10/1998 21:40:58
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00147002
Message ID:
00147982
Views:
33
>Must say I like your approach, much more VFP in style. Mine is more FPD. You add the objects to a form object, than save. I create a NewSCX from the OldSCX, record by record. I am sure your method is better. I might yet change.

I tried your way first, but then saw that the structure of the .scx is somewhat different, and that it's far easier to build the form object in memory - and it knows perfectly well how to save itself into a .scx; though, it's a bit of a pain to keep individual records connected to objects. I solved it by giving the objects same names as the corresponding fields in tables (in my DOS framework it was impossible to use same field twice, so this was OK for a search key).

> It fun and challenging to read code in serb language.

Ummm... I hope I supplied enough comments. If there's something you need, we'll switch to e-mail anytime and clear things up.

>I finally read in the UT about Reserved3 for naming user methods. Was having trouble geting methods recognized.

This one took me two days to figure out, including sending the question to M$, FoxWish, VFUG... which finally redirected me to discover the UT.

>About making variables available throughout the screen. You made them properties of the form and then went through the code replacing them with Thisform.VarX.Value. In order to have properties recognized do you have to mention properties in Reserved3 or somewhere else ?

Not exactly - I don't have private variables in my DOS forms; they are private to the routine which calls the form, so they can stay as such even in VFP; this goes for any variables which should be visible for any code snippet (which is a method now) but don't have any SAY/GET/EDIT. Those who have it, become controls on the form. This way I didn't have to add properties to the form.

>How do you compare this method to declaring them public for the duration of the form? While I recognize that with this method I will not be able to have multiple forms open, I'll try it first, because I won't have to modify the code. My priority for the time being is keeping one code base for both versions.

1. Thou shalt not kill
2. Thou shalt not have public variables
3...

A possible collision with another instance of the form is not the only bad thing which can happen - there may be other variables which may have had same names in various forms, so it can collide with any other form, or any other public variable. If it was private to the form in the FP, it should remain private - and the property is the way to go. If it was explicitly declared public in some code snippet, it should remain public. This way we reduce the chance of the converted form not working properly.

Anyway, you may try with a blank form, add a cople of properties, and see what appears in the reserved3, then mimic the behavior in your converter. This is how I found the proper format for new methods. I think any comment goes into the same line in the Reserved3, separated with a space.


This is where my converter falls short - I have made it convert _my_ forms, and all of my forms belong to my framework and there's a number of things which are never done. One of them is having variables of its own; my DOS forms were a set of procedures called from an universal form driver routine (which had a set of its own variables to do housekeeping of various states a form may be in while running), so any variable needed to be declared public if it was to be visible from other snippets. I had a way to keep them around, by generating declarations for them but no GET statements, if they were in the zero line.

I'm mentioning this because you've taken the hard way - making a general purpose converter has to take many GenScrn thingies into account, the #region and other #things.

A thing I'd like to see in it is a font picker, and saving the font as default. Also, default class picker for date, number, memo and text fields (etc), which would also be saved for later. One thing that I hate at VFP report converter is that I have to choose font every time.

back to same old

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

Click here to load this message in the networking platform