Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tk- DialogBox error

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Joined
Feb 6, 2002
Messages
1,851
Location
IL
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 !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top