jerre_111 has asked for the wisdom of the Perl Monks concerning the following question:

Hey monks

I'm working on a unix environnement using Perl with the Tk module. I'm using the getOpenFile widget to browse for a file to open.

Everything works fine, but I have one issue. When I browse, I can see a lot of hidden files (.* types).

I want to prevent from seeing the hidden files when browsing with the getOpenFile window. But I can't seem to find how to do it..

Any help and tips will be much appreciated!

Thank you

Replies are listed 'Best First'.
Re: Hidden files in getOpenFile
by choroba (Cardinal) on May 16, 2013 at 11:20 UTC
    You might want to switch to Tk::FileDialog which features the -ShowAll switch (not tested).
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
        Patches for both the bugs are included in the reports, but you are probably right :-)
        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re: Hidden files in getOpenFile
by Anonymous Monk on May 16, 2013 at 11:17 UTC

    getOpenFile has a bunch of open bugs, but try

    my $data_file_file_types = [ [ $file_str, '.txt' ], [ 'All files', '*' ], ]; ...->getOpenFile( -filetypes => $data_file_file_types, ...

      Thanks for your advice

      Doing the technique you proposed isn't working. Specifying the file types doesn't affect seeing the hidden files or not.

      Thank you for your time