Re: patch for getOpenFile,getSaveFile and chooseDirectory

Slaven Rezic <[email protected]> 24 Mar 2007 22:28:20 +0100
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
"Roland Minner" <[email protected]> writes:

> Hi,
> 
> i'd like to propose/submit a patch for getOpenFile, getSaveFile and chooseDirectory.
> Reason:
> They can only handle a path if it has the correct Format for the OS involved.
> Most Perl Modules are rather flexibel concerning the format of a filepath, so it would be nice if the functions named above would also be as flexible.
> 
> For example:
> Most Perl modules can handle a path like c:/WINNT, where a slash is used instead of a backslash. Some even return a mixture of both - e.g.:
> use File::Find;
> find(sub{print "$File::Find::name\n"}, 'c:\WINNT');
> 
> this will print a mixture of slashes an backslashes:
> c:\windows/system32
> 
> getOpenFile & co will silently ignore such directories as it is an invalid path under win32, giving the impression of the option not working. 
> 
> I attached a simple patch for Tk.pm (Tk-804.027_500), which would correct the path of the options -initialfile and -initialdir using File::Spec->catfile. 
> 

Thanks. I applied the patch to the Tk SVN repository at:
https://svn.perl.org/modules/Tk/trunk

Regards,
        Slaven

-- 
Slaven Rezic - slaven <at> rezic <dot> de

    tkruler - Perl/Tk program for measuring screen distances
    http://ptktools.sourceforge.net/#tkruler
--++**==--++**==--++**==--++**==--++**==--++**==--++**==
ptk mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/ptk