Subject: | Tk::DirTree does not work on MSWin32 |
use Tk;
use Tk::DirTree;
my $mw = new MainWindow;
my $dt = $mw->DirTree->pack;
$dt->configure(-directory => 'C:/Perl/bin');
MainLoop;
__END__
The result is as follows:
Tk::Error: parent element "\C:" does not exist at c:/perl/lib/Tk.pm line
252.
Tk callback for .dirtree
Tk::__ANON__ at c:/perl/lib/Tk.pm line 252
Tk::DirTree::add_to_tree at c:/perl/site/lib/Tk/DirTree.pm line 148
Tk::DirTree::set_dir at c:/perl/site/lib/Tk/DirTree.pm line 99
Tk::After::once at c:/perl/lib/Tk/After.pm line 89
[once,[{},after#4,idle,once,[{},set_dir,C:/Perl/bin]]]
("after" script)
I think the problem is Tk/DirTree.pm line 98. Why is there an explicit
'/' as the first argument to catfile? If I simply remove that '/' it
works on MSWin32...
--
- - Martin 'Kingpin' Thurn