1. getOpenFileName() Problem
- Posted by doncole2009 Jul 22, 2009
- 839 views
Hello All,
The docs for getOpenFileName say:
filename = getOpenFileName( theWindow, -- parent window\\ "", -- no default name LINE 2\\ {"Text File", "*.TXT"}) -- text files\\ "All Files", "*.*" } ) -- everything else\\
When I run this the folder where the file is located opens and only the text files show.
if I change to:
filename = getOpenFileName( theWindow, -- parent window "C:\\", -- no default name LINE 2 {"Text File", "*.TXT"}) -- text files "All Files", "*.*" } ) -- everything else The c: folder opens but all files are shown. None filtered. Don Cole
2. Re: getOpenFileName() Problem
- Posted by DerekParnell (admin) Jul 22, 2009
- 776 views
doncole2009 said...
... The c: folder opens but all files are shown. None filtered ...
The bug is in the buildDefaultOfn routine in w32file.ew
Find these lines in the routine
-- Check to see if a directory name was supplied. if length(fName) > 0 and fName[length(fName)] = '\\' then fName &= "*.*" end if
and change them to
-- Check to see if a directory name was supplied. if length(fName) > 0 and fName[length(fName)] = '\\' then if length(fName) = 3 and fName[2] = ':' then fName &= ".\\." else fName &= "." end if end if
3. Re: getOpenFileName() Problem
- Posted by doncole2009 Jul 22, 2009
- 768 views
Thank you Derek,
You were right on the job again.
Don Cole