in reply to Re: Tk::getOpenFile & select error
in thread Tk::getOpenFile & select error

Chris,

Thanks for the response regarding _get_select_path.

After fixing the above mentioned, I was able to modify FBox.pm to solve my initial problem.

I found that if the multiple option was selected, a file name was returned.

So I modified the routine 'ActivateEnt'as follows

sub ActivateEnt {

my $w = shift;

if ($w->cget(-multiple)) {

# For the multiple case we have to be careful to get the file

# names as a true list, watching out for a single file with a

# space in the name. Thus we query the IconList directly.

$w->{'selectFile'} = [];

for my $item ($w->{'icons'}->Curselection) {

$w->VerifyFileName($w->_get_from_icons($item));

}

} else {

#my $ent = $w->{'ent'};

#my $text = $w->_encode_filename($ent->get);

#print "text : $text\n";

#$w->VerifyFileName($text);

$w->{'selectFile'} = [];

for my $item ($w->{'icons'}->Curselection) {

$w->VerifyFileName($w->_get_from_icons($item));

}

}

}

Cheers Jonathan