Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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
Replies are listed 'Best First'.
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 :-)
        لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
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?
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 studying the Monastery: (10)
As of 2015-08-03 22:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (58 votes), past polls