Hi All,
  On similar lines I too have a problem related to pTK.Earlier I was using perl 
5.004.Recently upgraded to 5.8.8.I had a piece of code that use to display the 
Dialog Box before the mainWindow pops up.This routine was called before my 
mainWindow is displayed and used to show the Progress message.This currently 
core dumps.any reason why.I tried calling the transient method,but still the 
problem persists.Is this a known issue with 5.8.8.

sub waitCommand {
    my ($mainWindow, $label) = @_;

    my $dialog = $mainWindow->Dialog (-title => "Working... please wait",
            -text => $label, -bitmap => "hourglass", -buttons => []);
    #$dialog->transient("");
    $dialog->Popup();
    $dialog->update();
    $dialog->withdraw();
}
  


On Tue, 17 Jul 2007 Steve Waltner wrote :
>BTW, I was given a solution on the ptk mailing list. The code snippet
>should read:
>
>=======
>use Tk;
>use Tk::DialogBox;
>
>$main = MainWindow->new();    # this creates the main dialog box
>$dialog = $main->DialogBox (-title => "TITLE BAR TEXT", -buttons =>
>[ "Button 1","Button 2" ] ); # this creates the desired box
>$dialog->transient('');
>$main->withdraw();            # this makes the main dialog box invisible
>$button = $dialog->Show();    # this makes the desired dialog box appear
>$main->destroy();             # this destroys the main dialog box
>print "Button pushed: $button\n";
>=======
>
>which has a difference of the the line reading "$dialog->transient('');"
>
>Steve
>
>On Jul 16, 2007, at 1:56 PM, Steve Waltner wrote:
> > We've been running ActivePerl 5.8.0.806 on Windows for some time and
> > recently upgraded to ActivePerl 5.8.8.817. Along the way (ActivePerl
> > 5.8.4) the Perl Tk module was upgraded to 804.027. Previously, it had
> > been using 800.???. While Perl 5.8.8 fixed the original problem we
> > had, it
> > introduced a problem where the behavior of DialogBox changed and our
> > dialog boxes are no longer being displayed. A code snippet that
> > demonstrates this is:
> >
> > =======
> > use Tk;
> > use Tk::DialogBox;
> >
> > $main = MainWindow->new();    # this creates the main dialog box
> > $dialog = $main->DialogBox (-title => "TITLE BAR TEXT", -buttons =>
> > [ "Button 1","Button 2" ] ); # this creates the desired box
> > $main->withdraw();            # this makes the main dialog box
> > invisible
> > $button = $dialog->Show();    # this makes the desired dialog box
> > appear
> > $main->destroy();             # this destroys the main dialog box
> > print "Button pushed: $button\n";
> > =======
> >
> > The problem is that the user wants to hide the main window and still
> > show the DialogBox. With version 4.x of DialogBox.pm, the "withdraw"
> > that hides $main also keeps $dialog from being shown on the screen.
> >
> > How should one code it where you hide the main Tk window, but are
> > still allowed to show a DialogBox created off the main window?
> >
> > Steve
> >
> > _______________________________________________
> > ActivePerl mailing list
> > [email protected]
> > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
>_______________________________________________
>ActivePerl mailing list
>[email protected]
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to