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

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

···

“John Johnson” jj5412@earthlink.net wrote:

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