There's more than one way to do things | |
PerlMonks |
Perl Tk & passing directoriesby Anonymous Monk |
on Aug 13, 2002 at 14:57 UTC ( [id://189811]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I'm a newbie in Perl Tk and am trying to write a program that lets a user to choose a
directory, like c:\windows. My goal is so that
an output file will be written to this directory after the program is finished.
The code (written by someone else) I'm using to access the file's directory is like this:
What I have so far is this: When I run my program, two windows pop up. The first window (which does other stuff that my program needs) has an entry widget, and the second window is the one where I can select the directory (like the code above). What I'm having trouble with: When I select the directory, I want the directory to show up in the entry widget of my first window. i.e. I select "c:\windows" as my directory, so the words "c:\windows" should show up in my entry widget. It's kinda like how getOpenFile automatically returns the string for you. The problem is that I don't know how to pass this string back to the first widow's entry widget. And will the computer recognize it as an actual directory, and not merely any old string? I just want the computer to eventually write an output file to this directory (i.e. the one that the user chooses). Am I going about this all wrong? Is there a better way? Thanks for your help!
Back to
Seekers of Perl Wisdom
|
|