Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cntgetfile not returning empty string on cancel
Message
From
24/07/2003 10:16:02
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
CodeMine
Title:
Cntgetfile not returning empty string on cancel
Miscellaneous
Thread ID:
00813084
Message ID:
00813084
Views:
47
I am using the cntgetfile control to return a direcorty path.

In the cntgetfile.cmdpath.click, button I have the following code:
Local lcDefaultDir, lcDesktop
lcDefaultDir=Sys(5)+Sys(2003)
lcDesktop=Thisform.zgetdir(4) &&returns the path to the computer’s desktop folder
Set Default To (lcDesktop)
DoDefault()
Set Default To (lcDefaultDir)
Local lcPath
lcPath=This.Parent.cvalue
The problem I am having is, even if the user presses the cancel button, lcPath is returning a value.
If the user escapes or presses cancel, I would like to have it return the empty string as per the getdir function.
In this case, if the user selects nothing, presses cancel, lcpath= (the desktop folder path) .
Reply
Map
View

Click here to load this message in the networking platform