VisualuRuby openFilename starting directory 
Author Message
 VisualuRuby openFilename starting directory

Hi,

Is there a way to set the directory for a Swin::CommonDialog.openFilename()
call? For example, I might want to set the directory to the last directory
a person used, using a value I saved.

I'm looking at the swin source, and don't see anything obvious.

Thanks,
  JJ



Tue, 15 Nov 2005 19:41:09 GMT  
 VisualuRuby openFilename starting directory

Quote:

> Hi,

> Is there a way to set the directory for a Swin::CommonDialog.openFilename()
> call? For example, I might want to set the directory to the last directory
> a person used, using a value I saved.

> I'm looking at the swin source, and don't see anything obvious.

> Thanks,
>   JJ

Last I looked, it was not implemented.

You can do -

  Dir.chdir('D:\somedir\orother')

before the call to Swin::CommonDialog.openFilename()
if it's not too disruptive.

Also, there's

  cwd = Dir.getwd
  Dir.chdir('D:\somedir\orother')
  (-call to Swin-)
  Dir.chdir(cwd)

if you need to preserve the current working directory
over the call (although I never know what it's set to).

daz



Wed, 16 Nov 2005 15:23:49 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. using openfilename

2. Working directory when started by association under Warp

3. starting sector of root directory.

4. Help Starting excel from tcl, with spaces in directory path

5. Directory of File/Directories on CD

6. copy file from one directory to another directory

7. Creating Directories & Sub-Directories from Clarion

8. dosnames - directory DOSify a directory

9. Copying multiple directories to one directory

10. pathname-directory when pathname is a directory

11. Getting at directories with DIRECTORY

12. Newbie: import works ok if in base directory but fails in other directories

 

 
Powered by phpBB® Forum Software