Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Hidden files in getOpenFile

by jerre_111 (Sexton)
on May 16, 2013 at 11:12 UTC ( #1033808=perlquestion: print w/ replies, xml ) Need Help??
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

Comment on Hidden files in getOpenFile
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

Re: Hidden files in getOpenFile
by choroba (Canon) 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 :-)
        لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1033808]
Approved by marto
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (16)
As of 2015-06-03 19:08 GMT
Find Nodes?
    Voting Booth?

    What kind of chocolate gives you the most pleasure?

    Results (138 votes), past polls