[Nh-pm] Dirtree

jim.mcginness at att.net jim.mcginness at att.net
Fri Sep 20 14:44:42 CDT 2002


Franklin Black wrote:

> use Tk;
> use Cwd;
> use Tk::DialogBox;
> use Tk::DirTree;
> my $directory='s:\\';
> my $top = new MainWindow;
> $top->DirTree();

I tried to get the same error you did, but could not; everything worked okay 
for me once I made some adjustments.

$tree = $top->DirTree( -directory=>$directory);
$tree->pack(-fill=>'both');
MainLoop;

At the point where you stopped, I didn't see how you were going to get your
$directory variable into the DirTree object, now how you intended to hold 
onto its handle for doing the needed 'pack'.

I believe the most relevant error message is the one about "Can't set 
-directory to `.' for Tk::DirTree...". It looks like you have some fancy
aliasing going on for drive L that perl isn't happy with when it tries to
fill in a default for the -directory value. By supplying your own, you should
be able to get around this problem. I can't promise that there won't be more
problems down the road.





More information about the Nh-pm mailing list