[Thread Prev][Thread Next][Thread Index]
Re: [PilotMgr] can't select files for restoring
- To: girgen@xxxxxxxxxxx, pilotmgr@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [PilotMgr] can't select files for restoring
- From: Adam Stein <adam@xxxxxxxxxxxxxxxxx>
- Date: Mon, 9 Oct 2000 16:42:25 -0400 (EDT)
- Reply-to: Adam Stein <adam@xxxxxxxxxxxxxxxxx>
- Sender: owner-pilotmgr@xxxxxxxxxxxxxxxxxxxx
Attached is a patch that will fix the problem. Only the "Installer.pm" file
needs to be changed to use the version of FileSelect that Tk comes with.
Apparently, the new version of FileSelect allows multiple selections, so my old
fix isn't needed anymore. I have tried this with Perl/Tk v800.022 and it seems
to work fine.
I suppose the proper thing would have been to check the version of Tk that is
being used and to use the old MultiFileSelect if version 4.x was running. Is
anybody still using Tk 4.x?
Adam
--
Adam Stein @ Xerox Corporation Email: adam@xxxxxxxxxxxxxxxxx
Disclaimer: All views expressed
here have been proved to be my own. [http://www.csh.rit.edu/~adam/]
*** Installer.pm.dist Mon Oct 9 16:34:01 2000
--- Installer.pm Mon Oct 9 16:34:39 2000
***************
*** 24,31 ****
use Data::Dumper;
use Cwd;
use Tk;
! require "MultiFileSelect.pm"; # Change back to "use Tk::FileSelect;" if Tk
! use TkUtils; # gets updated with Adam's changes!
use File::Basename;
use File::Copy;
use strict;
--- 24,31 ----
use Data::Dumper;
use Cwd;
use Tk;
! use Tk::FileSelect;
! use TkUtils;
use File::Basename;
use File::Copy;
use strict;
***************
*** 163,169 ****
if (!defined($gFileSelector))
{
$PREFS->{"lastdir"} = "." unless (-d $PREFS->{"lastdir"});
! $gFileSelector = $gWm->MultiFileSelect(
-directory => $PREFS->{"lastdir"},
-selectmode => 'multiple',
'-accept' =>
--- 163,169 ----
if (!defined($gFileSelector))
{
$PREFS->{"lastdir"} = "." unless (-d $PREFS->{"lastdir"});
! $gFileSelector = $gWm->FileSelect(
-directory => $PREFS->{"lastdir"},
-selectmode => 'multiple',
'-accept' =>