Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: using Tk::FileSelect

by strider corinth (Friar)
on Nov 05, 2002 at 16:22 UTC ( #210495=note: print w/ replies, xml ) Need Help??


in reply to using Tk::FileSelect

The problem looks like it stems from the way Tk::FileSelect handles file masks, and its selection verifying feature. You aren't allowed (by default) to pick directories, just files. So when you select /usr/local/*, you're seeing odd results because you're not selecting the directory itself, but all of the files within it.

If you add $fs->configure( -verify => [ '-e' ] ); after you create your selection dialog, it will switch the verification flag from '!-d' (don't select directories) to '-e' (select anything that exists). My test program returns just the directory name when that line is inserted.

For more info, check the CPAN docs for Tk::FileSelect.
--

Love justice; desire mercy.


Comment on Re: using Tk::FileSelect
Download Code
Re: Re: using Tk::FileSelect
by wmoran (Initiate) on Nov 05, 2002 at 16:49 UTC
    That does it, thanks for the reply.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-12-29 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (183 votes), past polls