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

getDirectory?? (PerlTk)

by herby1620 (Monk)
on Apr 06, 2007 at 22:43 UTC ( [id://608772]=perlquestion: print w/replies, xml ) Need Help??

herby1620 has asked for the wisdom of the Perl Monks concerning the following question:

I'm using PerlTk (on a Windows [yuck!] platform). Mostly is is very nice and the nice gui's are all wonderful. At times I want to get a file, and the routine 'getOpenFile' or 'getSaveFile' works quite well. The problem now is that I desire to obtain a directory name where I'll get some files, and put some more (pre-defined names). The problem is that there is no 'getDirectory' (or its equivalent, whatever the name) in PerlTk. I may have run across this before, but as I didn't need it at the time (I do now!) I didn't bookmark it. Hints are most welcome.

My current solution is to ask for a file in the directory, but that is a bit tedious as the only one I can properly ask for is a few levels down from where I want to be.

Replies are listed 'Best First'.
Re: getDirectory?? (PerlTk)
by mifflin (Curate) on Apr 06, 2007 at 23:57 UTC
    how about chooseDirectory ?
      I knew there was something.
      Now for the "bad news":
      I'm stuck with perl 5.6.x
      While it is documented over at CPAN (thanks!). There is no mention of it in _Mastering PerlTk_ (why I asked!).
      Thanks for the answer. I may need to "roll my own" or some such. Maybe I can lift the code from PerlTk 804.
Re: getDirectory?? (PerlTk)
by zentara (Archbishop) on Apr 07, 2007 at 10:21 UTC
    You might like Tk::CanvasDirTree. It's only minimally tested on windows, but feel free to modify it. I originally wrote it to emulate Gtk2's Tree widegt, and gave it a floating background image.

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 07:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found