From: daz Date: 2003-05-31T16:36:20+09:00 Subject: Re: VisualuRuby openFilename starting directory "John Johnson" 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 > > 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