Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Migration from VFP3.0 to VFP7.0

Status
Not open for further replies.

sumpun

MIS
Feb 20, 2002
21
HK
DO I need to make any drastic changes to migrate a program written in VFP3 to VFP7 ?

Before converting and using the software, do I need to make changes.

I tried it using a beta version of VFP7 and it was fine. I did not get the same problems as I did with version 5 or 6 where I was unable to use some commands in some methods.

Also, can VFP7.0 support chinese language input. VFP3.0a does have this support.
 
While I can't comment on the Chinese language support, there are a few issues upgrading from 3 to 7.
The following are some basic upgade concerns you MAY run into:
In the 3-> 5 upgrade support for setfocus() in when() and valid() methods was dropped. In the 5 -> 6 upgrade, the biggest changes had to do with date support (remember Y2K?), but setting STRICTDATE can over ride most of these. (Although cleaning up the potentially ambiguous references is actually a better idea.) In the 6 -> 7 upgrade you may run into tightened syntax, to support intellisense and other new features. In general, you may run into new keywords (functions and command extensions) that you used as variables and fields, and functions that were moved from FoxTools to "native" use - sometimes with minor changes.

Rick
 
What can I use instead of setfocus() in when and valid, as I have alot of those.

As for the Y2K issue, I used SET CENTURY ON, which allowed to get round the Y2K problem.
 
In some cases, it as easy as moving the When() code to the GotFocus() method and the Valid() code to the LostFocus() method, but it really does depend on the code logic.

The non-ambiguous date problems can't simply be addressed by SET CENTURY. e.g.
ldSave = {01/02/01} && or even {01/02/2001}
will be flagged! You'll want to change it to:
ldSave = {^2001/01/02}
Also CTOD() can get you in trouble - better to use the extended DATE() function.

Rick
 
In line with the When() and Valid() events is a very frustrating point when you don't know where to look.

SetFocus() cannot be used if When() or Valid() events are ANYWHERE in the call stack! For example, if you call a modal form in the Valid() event of a text box, the Valid() event remains in the stack until it finishes. This means that ANY use of SetFocus() on the called form will generate an error!

If you need to conditionally set the focus to a control in the Valid() event of another control, and you absolutely cannot use LostFocus() instead, try returning a number from the Valid() event. This number represents how many tab stops to advance from this control to determine which control gets the focus next.

Hope that wasn't too confusing...

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top