Page 1 of 1

Getfile problem with nochangedir

Posted: Fri Jan 22, 2010 9:16 pm
by l3whmg
Hi at all,
I found a problem with "GetFile" and "PutFile" functions.
I'm using this syntax:

Code: Select all

Getfile( aFilter, cPrompt, cDir, .F., .F.)
But, the last parameter (NoChangeDir) don't work properly.
I have attached an example, with suggestion.
If you try the example, remember to change the directory, from the current one, to see the problem.

Ciao!

Re: Getfile problem with nochangedir

Posted: Sat Jan 23, 2010 12:04 am
by Roberto Lopez
l3whmg wrote:Hi at all,
I found a problem with "GetFile" and "PutFile" functions.
I'm using this syntax:

Code: Select all

Getfile( aFilter, cPrompt, cDir, .F., .F.)
But, the last parameter (NoChangeDir) don't work properly.
I have attached an example, with suggestion.
If you try the example, remember to change the directory, from the current one, to see the problem.

Ciao!
Thanks for the report.

I'll review it ASAP.

Re: Getfile problem with nochangedir

Posted: Sat Jan 23, 2010 12:30 am
by Roberto Lopez
l3whmg wrote:Hi at all,
I found a problem with "GetFile" and "PutFile" functions.
I'm using this syntax:

Code: Select all

Getfile( aFilter, cPrompt, cDir, .F., .F.)
But, the last parameter (NoChangeDir) don't work properly.
I have attached an example, with suggestion.
If you try the example, remember to change the directory, from the current one, to see the problem.

Ciao!
You have an error in line #63.

your code:

Code: Select all

cFile := Getfile( { {'All Files','*.*'} }, "File selection", cBefore, .F., .F.)
it should be:

Code: Select all

cFile := Getfile( { {'All Files','*.*'} }, "File selection", cBefore, .F., .T.)

Re: Getfile problem with nochangedir

Posted: Mon Jan 25, 2010 8:37 am
by l3whmg
Yes,
I'm sorry :oops: . I've looked now with your suggestion. I've copied an old program without a good test before and, perhaps, this was an old problem!
Thanks a lot.