Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GETFILE() change my path?
Message
From
25/08/2005 13:28:24
 
 
To
25/08/2005 12:33:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01043785
Message ID:
01043983
Views:
13
Getfile() does not change SET PATH.

>GETFILE() does change the "SET PATH" if a result is returned so you need to reset your path name after retrieving a result. Something like:
>
>lcPath = SET( "PATH" )
>lcFileName = GETFILE( lcFileName, "imp",  "Import File" )
>SET PATH TO lcPath
>
>While looking this up I found a bug fix comment in the same program relating to the use of LOCFILE() vs. GETFILE() which I found interesting. I'll just copy the comment here:
>
>* 1. Replace LOCFILE() function with GETFILE().  Primary difference is when
>*    the user presses "cancel" on GETFILE() an empty string is returned. . .
>*    OTOH, when pressing "cancel" with LOCFILE() VFP displays an error with
>*    which one of the options cancels VFP entirely -- not too cool.
>
>Scott
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform