mifflin has asked for the wisdom of the Perl Monks concerning the following question:
my $file = $Top->getOpenFile(-filetypes => $filetypes, -initialdir => +"C:/home");
I've tried...
\home
/home
c:\home
c:/home
C:/home
C:\home
The behavior I see is this...
The widget always starts out in the program's directory.
If you select a file in a different directory then that directory becomes the default until you select a file in another different directory.
If you stop the perl script and then restart it later somehow getOpenFile remembers the directory you were at last.
-initialdir => directory
Specifies that the files in directory should be displayed when the dialog pops up. If this parameter is not specified, then the files in the current working directory are displayed. This option may not always work on the Macintosh. This is not a bug. Rather, the General Controls control panel on the Mac allows the end user to override the application default directory.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Tk getOpenFile, can't get -initialdir to work
by Erez (Priest) on Apr 03, 2008 at 20:15 UTC | |
Re: Tk getOpenFile, can't get -initialdir to work
by jdporter (Paladin) on Apr 04, 2008 at 13:23 UTC | |
by mifflin (Curate) on Apr 04, 2008 at 17:46 UTC |