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

Hi Monks,

I am getting a Tk::FBox error which seems to be specific to fedora (can't replicate on windows at least) and the '-multiple' flag - setting it to 0 causes no error.

Here is the code:

#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = MainWindow->new(); my @files = $mw->getOpenFile(-multiple => 1,); print "File was '$_'\n" for @files;

And the error stack :

---> Desktop $ perl perl/tktest.pl ***-multiple => 0***
File was '/home/clayi/Desktop/fedora-eclipse.desktop'
---> Desktop $ perl perl/tktest.pl***-multiple => 1***
Tk::Error: Failed to AUTOLOAD 'Tk::FBox::_get_select_Path' at perl/tktest.pl line 8
Carp::croak at /usr/lib/perl5/5.10.0/Carp.pm line 44
Tk::Widget::__ANON__ at /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/Tk/Widget.pm line 347
Tk::FBox::Done at /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/Tk/FBox.pm line 909
Tk::FBox::VerifyFileName at /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/Tk/FBox.pm line 678
Tk::FBox::ActivateEnt at /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/Tk/FBox.pm line 647
Tk::FBox::OkCmd at /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/Tk/FBox.pm line 815
Tk callback for .fbox.frame1.button
Tk::__ANON__ at /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/Tk.pm line 250
Tk::Button::butUp at /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/Tk/Button.pm line 175
<ButtonRelease-1> (command bound to event)

I have submitted a bugzilla, but haven't heard anything for a month, has anyone else seen anything similar? Has anyone got a workaround/alternate module? I don't care what, I just need to be able to select multiple files.

Thanks in advance.

Just a something something...

Replies are listed 'Best First'.
Re: Tk::FileSelect error
by Anonymous Monk on Jun 10, 2009 at 13:39 UTC

      Very easy fix and works like normal now. Thanks again.
      Cheers

      Just a something something...