Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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 (Abbot) 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2014-09-18 02:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (104 votes), past polls