VFP 5 to VFP 6 code incompatibility

VFP 5 to VFP 6 code incompatibility

Post by John » Wed, 16 Dec 1998 04:00:00



This code runs in VFP 5.0a, but not the most recent version of VFP 6, which
generates a syntax error message.  Its purpose is to open a form or
activate
it if it is already open when a hot key is pressed.

ON KEY LABEL shift-f10 ;
IIF(WEXIST("DATES") AND WEXIST("FRMDESKTOP"),ActivateForm("DATES"), ;
DoForm('xfolder WITH ;
"xdates","Dates","filename","cDataLabel,dDate", ;
"Data Label,Date","","Dates","dDate" NAME ofrmDates LINKED',"DATES")))

JJ

 
 
 

VFP 5 to VFP 6 code incompatibility

Post by Steve_Potte » Thu, 17 Dec 1998 04:00:00



> This code runs in VFP 5.0a, but not the most recent version of VFP 6,
> which
> generates a syntax error message.  Its purpose is to open a form or
> activate
> it if it is already open when a hot key is pressed.

> ON KEY LABEL shift-f10 ;
> IIF(WEXIST("DATES") AND WEXIST("FRMDESKTOP"),ActivateForm("DATES"), ;
> DoForm('xfolder WITH ;
> "xdates","Dates","filename","cDataLabel,dDate", ;
> "Data Label,Date","","Dates","dDate" NAME ofrmDates LINKED',"DATES")))

> JJ

JJ,  It looks to me like you have one too many right parentheses .). in
the IIF statement.  Am I right?

Steve

 
 
 

VFP 5 to VFP 6 code incompatibility

Post by John » Fri, 18 Dec 1998 04:00:00


Hi Steve,

The code was clipped from a working program, and was pasted into the
command window for testing just before I posted it here.  I just tested it
again by directly cutting it from this post, and it worked.

Thanks for taking a look at it.

Quote:> > ON KEY LABEL shift-f10 ;
> > IIF(WEXIST("DATES") AND WEXIST("FRMDESKTOP"),ActivateForm("DATES"), ;
> > DoForm('xfolder WITH ;
> > "xdates","Dates","filename","cDataLabel,dDate", ;
> > "Data Label,Date","","Dates","dDate" NAME ofrmDates LINKED',"DATES")))

 
 
 

VFP 5 to VFP 6 code incompatibility

Post by Alexandre Pechtchans » Fri, 18 Dec 1998 04:00:00



>Hi Steve,

>The code was clipped from a working program, and was pasted into the
>command window for testing just before I posted it here.  I just tested it
>again by directly cutting it from this post, and it worked.

>Thanks for taking a look at it.

>> > ON KEY LABEL shift-f10 ;
>> > IIF(WEXIST("DATES") AND WEXIST("FRMDESKTOP"),ActivateForm("DATES"), ;
>> > DoForm('xfolder WITH ;
>> > "xdates","Dates","filename","cDataLabel,dDate", ;
>> > "Data Label,Date","","Dates","dDate" NAME ofrmDates LINKED',"DATES")))

Real strange. Either I suddenly forgot how to count to three using fingers, or
this statement _does_ have extra right parenthesis.  Shouldn't work.

[ When replying, remove *'s from address ]
Alexandre Pechtchanski, Systems Manager, RUH, NY

 
 
 

VFP 5 to VFP 6 code incompatibility

Post by SatChitAnan » Sat, 19 Dec 1998 04:00:00


In VFP, the code works with either 2 or 3 right parentheses at the end, even
though there should only be 2.  Apparently, there is a bug in the error
handler
for VFP 5 that got worked out in 6.  I didn't even bother to count the
parentheses
when I saw that the code ran in 5 because I just assumed an incorrect
parentheses
count would yield an error.

JJ

ON KEY LABEL shift-f10 ;
IIF(WEXIST("DATES") AND WEXIST("FRMDESKTOP"),ActivateForm("DATES"), ;
DoForm('xfolder WITH ;
"xdates","Dates","filename","cDataLabel,dDate", ;
"Data Label,Date","","Dates","dDate" NAME ofrmDates LINKED',"DATES")))

 
 
 

1. VFP and CTL3D32.DLL incompatibility?

I am running windows 95.  When I start VFP 3.0 a dialog appears on the
screen with the following text and an "OK" button.

"This applications uses CTL3D32.DLL, which is not the correct version.  
This version of CTL3D32.DLL is designed only for Windows NT systems."

When I click on "OK" everything appears to work normally.  Is this
normal for VFP?

2. Questions on 7.2.1 query plan choices

3. Building VFP 5 project into VFP 6 executable

4. Removing Name Pipes as the default protocol

5. VFP 5 to VFP 7

6. How to go to next record in custom web publishing?

7. VFP 5 to VFP 6

8. Compatibilty Issues between Alpha VMS 7.3 and Oracle 7.3.2

9. VFP 3.0 to VFP 6.0

10. VFP 3 or VFP 6 with Win '98

11. VFP 5.0 to VFP 6.0

12. ToolTipText ? confirm VFP 5 vs VFP 6