Retrieve file name from a File Explorer box

Started by macuma · 2010-02-15 16:26 UTC · 8 replies · SMF topic #1179

I have a text button on Form 2 which successfully opens a File Explorer dialog box Form 3.

On selecting a file or creating a new file how do I set the variable dat_loc to the file name? It is currently returning nil.

Does clicking Open on the dialog box carry out a close function?

(defun c:dat_Form2_TextButton3_OnClicked (/)
  (dcl_Form_Show dat_Form3)
);defun


(defun c:dat_Form3_OnClose (/)
  (setq dat_loc (dcl_FileExplorer_GetFileName dat_Form3))
);defun
Try:
(setq dat_loc (dcl_Form_Show dat_Form3))
Thank you for the quick response, but that did not work.
What exactly didn't work?
dat_loc is still set to nil even though file selected.
Can you provide a simple test project that demonstrates the problem?
Files as requested.
Attachments
I've attached a corrected .lsp file that is working fine for me.  Hopefully this will get you going again.
Attachments
Excellent! That did the trick.

Thanks for your help.