MoshiachNow
IS-IT--Management
I have the following code on Activestate Windows:
my $dialog6 = $mw->DialogBox (-title => 'Select zip file');
$dialog6->add ('Label', -text => 'Select zip file', -font => [ -weight => 'bold'],-foreground => 'red')->pack;
my($Horiz) = 1;
my($fname);
my($LoadDialog) = $dialog6->FileDialog(-Title =>'This is my title',-Create => 0);
print "Using FileDialog Version ",$LoadDialog->Version,"\n";
$LoadDialog->configure(-FPat => '*pl',-ShowAll => 'NO');
$mw->Entry(-textvariable => \$fname)->pack(-expand => 1,-fill => 'x');
$mw->Button(-text => 'Kick me!', -command => sub {
$fname = $LoadDialog->Show(-Horiz => $Horiz);
if (!defined($fname)) {
$fname = "Fine,Cancel, but no Chdir anymore!!!";
$LoadDialog->configure(-Chdir =>'NO');
}
}) ->pack(-expand => 1, -fill => 'x');
$mw->Checkbutton(-text => 'Horizontal', -variable => \$Horiz)->pack(-expand => 1,-fill => 'x');
$mw->Button(-text => 'Exit',-command => sub{$mw->destroy;})->pack(-expand => 1,-fill => 'x');
It gives the following error:
can't make ".dialogbox5.top.filedialog" its own master at D:/Perl/site/lib/Tk/Submethods.pm line 37. at D:/Perl/site/lib/Tk/FileDialog.pm line 470
Aprreciate any ideas.
Thanks
Long live king Moshiach !
my $dialog6 = $mw->DialogBox (-title => 'Select zip file');
$dialog6->add ('Label', -text => 'Select zip file', -font => [ -weight => 'bold'],-foreground => 'red')->pack;
my($Horiz) = 1;
my($fname);
my($LoadDialog) = $dialog6->FileDialog(-Title =>'This is my title',-Create => 0);
print "Using FileDialog Version ",$LoadDialog->Version,"\n";
$LoadDialog->configure(-FPat => '*pl',-ShowAll => 'NO');
$mw->Entry(-textvariable => \$fname)->pack(-expand => 1,-fill => 'x');
$mw->Button(-text => 'Kick me!', -command => sub {
$fname = $LoadDialog->Show(-Horiz => $Horiz);
if (!defined($fname)) {
$fname = "Fine,Cancel, but no Chdir anymore!!!";
$LoadDialog->configure(-Chdir =>'NO');
}
}) ->pack(-expand => 1, -fill => 'x');
$mw->Checkbutton(-text => 'Horizontal', -variable => \$Horiz)->pack(-expand => 1,-fill => 'x');
$mw->Button(-text => 'Exit',-command => sub{$mw->destroy;})->pack(-expand => 1,-fill => 'x');
It gives the following error:
can't make ".dialogbox5.top.filedialog" its own master at D:/Perl/site/lib/Tk/Submethods.pm line 37. at D:/Perl/site/lib/Tk/FileDialog.pm line 470
Aprreciate any ideas.
Thanks
Long live king Moshiach !