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

Replies are listed 'Best First'.
Re: Hidden files in getOpenFile
by choroba (Bishop) 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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1033808]
Approved by marto
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2018-06-23 13:14 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (125 votes). Check out past polls.