I'm trying to get the Tk getOpenFile widget to start out in a specific directory. The docs say to use the -initialdir option like this...
my $file = $Top->getOpenFile(-filetypes => $filetypes, -initialdir =>
However, it does not seem to work for me.
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.
Here is the perldoc on the option...
-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.
Perl 5.8.8 build 820