Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set default to issue
Message
 
 
To
02/12/2015 16:28:47
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01628271
Message ID:
01628366
Views:
36
>>>>I did but to no avail. I even disconnected from the mapped drive and still a problem. Strange is that right before the "GetFile()" code I check the current folder and it is the right folder. And after the GetFile() the program still looks at the right folder. But GetFile() opens the window in a "wrong" folder. Strange.
>>>
>>>I don't think GetFile() dialog uses default path.
>>
>>You mean that when you call GetFile() it does not open in the Current Directory?
>
>Just for kicks, try a CD (currentfolder) before getfile(). Because getfile() is basically a wrapper around a windows explorer (renamed file explorer now, both names completely wrong), which may get its preferred start folder from who knows which API call. My guess is that Set Default and CD may not really use the same API to set that; also curdir() is suspect as it doesn't return the drive (i.e. it may be using some way obsolete API), so perhaps the newer set("directory") (undocumented but works) may work.
>
>IOW, try these before you issue a getdir() and see what you get.

You are right about one thing, if I read your message correctly, that getfile() is not stable. In this case of the problem I noticed that getfile() - not always but often - "remembers" where the last time Open Dialog was opened. And the following time it may open in the same location (folder) even when the current folder is different. In the case I am dealing with there are 5 copies of my software installed; the same version of .EXE, the same data structure, just each one is in a different folder. But 2 copies do not seem to have the problem and 2 others have the problem (the resulting 1 I have not tested thoroughly). But in the case of the "problem" copies I noticed that "sticking" of the last folder to the getfile(). If I have time I may even start writing/creating my own getfile(); with VFP it can be done.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform