Hello, all,

At work we're in the process of transferring to a new set of systems. The old systems are Solaris 8 machines, with Perl 5.6 and Tk400.202. The new systems are a Linux machines. The Linux machines have a corporate provided Perl 5.8.8, and we have the distribution provided Perl 5.10. Both of the perls installed have Tk804.027. When we started testing the new systems, though, we started having problems, which seem localized to programs using Tk. The major problem that we have that we can't seem to find a solution to is window resizing. For example, in the following code, the window resizes at the beginning, but when the 'Continue' button is selected, the window immediately shrinks, but never expands after the next set of frames are packed.
#!/usr/bin/perl -w use Tk; use Tk::Label; use Tk::Button; use Tk::Menubutton; use Tk::Menu; use Tk::LabEntry; use Tk::Dialog; use Tk::DialogBox; use Tk::Frame; $mw = MainWindow->new(); get_job(); $mw->update; MainLoop(); sub get_job { $wjLabEntry = $mw->Frame(-bg => "wheat1")->pack(); my $jobentry = $wjLabEntry->Entry(-width => 10)->pack(-side +=> 'left'); $mode_buttons = $mw->Frame(-bg => "wheat1")->pack(); my $DoButton = $mode_buttons->Button(-text => 'Continue', -command + => sub {&do_setup()} )->pack (-side => 'left', -expand => 1); my $QuitButton = $mode_buttons->Button(-text => 'Quit', -command = +> sub {Tk::exit} )->pack (-side => 'left', -expand => 1); my $HelpButton = $mode_buttons->Button(-text => "Help", -command = +> sub {&HelpTxt} )->pack (-side => 'left', -expand => 1); $jobentry->focus; $jobentry->bind('<Return>',sub {$DoButton->focus}); } sub do_setup { if (Exists $wjLabEntry) { $wjLabEntry->destroy; $mode_buttons->destroy; $wjLabEntry = $mw->Frame(-bg => "wheat1")->pack(); $mode_buttons = $mw->Frame(-bg => "wheat1")->pack(); my $QuitButton = $mode_buttons->Button(-text => "Terminate", - +command => sub {Tk::exit} )->pack (-side => 'left', -expand => 2); my $HelpButton = $mode_buttons->Button(-text => "Help", -comma +nd => sub {&HelpTxt} )->pack (-side => 'left', -expand => 2); $HelpButton->bind('<e>',\&HelpTxt); $mode_buttons->update; $mw->update; } $PartStep = $mw->Frame(-bg => "wheat1")->pack(-fill => 'both'); my $DrillButton = $PartStep->Button(-text => 'DRILL/ROUT', -comman +d => sub {&getDrill();&CleanUp();} )->pack(-side => 'left'); my $ToolButton = $PartStep->Button(-text => 'TOOLING', -command => + sub {&getTool();&CleanUp();} )->pack(-side => 'left'); my $AllButton = $PartStep->Button(-text => 'All', -command => sub +{&getTool();&CleanUp();} )->pack(-side => 'right', -fill => 'x', -expand = +> 1,); $mw->update; }
Anyone have any idea why that code shouldn't resize the window?

In reply to Problems after upgrading both Perl and Tk by monksp

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.