This is how it goes, i make a prg with this coding below;
lcdir=GETDIR()
SUSP
IF !DIRECTORY(lcdir)
//some code here
ENDIF
then I run the prog, it works fine, the window that shows the directory tree pop-ups, then I click the button SELECT, the window's gone,but instead of the debugger will comes-up next or I will select the debugger from the menu, the windows that show the directory will pops-up again & again. No matter how I click the CANCEL button, there it goes. The debugger will comes-up but you cannot click it, in short it hang.
Why does it happen
Thanks for any help

a bug or i miss something?
_RK_
Maybe SET STEP ON is what you just need :
lcdir=
GETDIR()SET STEP ON
IF
!DIRECTORY(lcdir) * some code hereENDIF
SteveJB
Thank you... but it doesn't work just d'same the window pop's-up then I click select there goes again it hangs. the debugger will then pop-up but you cant click it either.
My purpose for that, is that I just wanted to see if the directory name is in the variable.
But how could I see it, the debugger got stuck!
I have to press Ctrl+Alt+Delete to be able to start again.
Where I got wrong . I copy your code and run it but it's d'same.
Scott47
Sounds like you have a bad installation. This code runs fine on my machine in all versions of VFP from 6 through 9. I suggest you un-install VFP and re-install from the original disk.
Jeff Maurone
This code does exactly what it says it should for me. I don't understand what you want to do. But if you want the debugger, then you should use SET STEP ON or DEBUG (not SUSPEND).
The reason the window pops up again is that iuf you cancel out of GetDir() you get an empty string. Clearly you cannot test for an empty string as a Directory so you get the dialog again. Try:
lcDir = GETDIR()
IF NOT EMPTY( lcDir )
SET STEP ON
IF NOT DIRECTORY( lcDir )
*** Code here
ENDIF
ELSE
*** User cancelled! Do something....
ENDIF