in reply to how Tk wedgets interact?

quote (if there are 2 mainwindow, is it ok?)

To be able to create a second MainWindow, you have to destroy the first one...

#!perl -w use strict; use Tk; my $mw = MainWindow->new(); my $button = $mw->Button( -text => 'killme', -command => $mw->destroy(), )->pack; MainLoop; print "After first MainLoop\n"; my $mw = MainWindow->new(); my $button = $mw->Button( -text => 'exit', -command => exit, )->pack; MainLoop; print "this won't be printed...\n";
A MainWindow is a special form of a Toplevel; better try to use one MainWindow and one Toplevel instead... </code>

Best regards,
perl -le "s==*F=e=>y~\*martinF~stronat~=>s~[\w]~~g=>chop,print"