DialogBox not Being Displayed
am 16.07.2007 20:56:38 von Steve Waltner
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
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: DialogBox not Being Displayed
am 17.07.2007 17:12:51 von Steve Waltner
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
> ActivePerl@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Re: DialogBox not Being Displayed
am 17.07.2007 20:47:08 von sudhir babu
This is a multipart mime message
--===============0791331464==
Content-type: multipart/alternative;
boundary="Next_1184698028---0-202.54.124.153-13998"
This is a multipart mime message
--Next_1184698028---0-202.54.124.153-13998
Content-type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi All,=0A 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 wa=
s called before my mainWindow is displayed and used to show the Progress me=
ssage.This currently core dumps.any reason why.I tried calling the transien=
t method,but still the problem persists.Is this a known issue with 5.8.8.=
sub waitCommand {=0A my ($mainWindow, $label) =3D @_;
my =
$dialog =3D $mainWindow->Dialog (-title =3D> "Working... please wait",=0A =
-text =3D> $label, -bitmap =3D> "hourglass", -buttons =3D> []);=
=0A #$dialog->transient("");=0A $dialog->Popup();=0A $dialog->upda=
te();=0A $dialog->withdraw();=0A}=0A
On Tue, 17 Jul 2007 Ste=
ve Waltner wrote :=0A>BTW, I was given a solution on the ptk mailing list. =
The code snippet=0A>should read:=0A>=0A>=======
>use Tk;=0A=
>use Tk::DialogBox;=0A>=0A>$main =3D MainWindow->new(); # this creates t=
he main dialog box=0A>$dialog =3D $main->DialogBox (-title =3D> "TITLE BAR =
TEXT", -buttons =3D>=0A>[ "Button 1","Button 2" ] ); # this creates the des=
ired box=0A>$dialog->transient('');=0A>$main->withdraw(); # this=
makes the main dialog box invisible=0A>$button =3D $dialog->Show(); # t=
his makes the desired dialog box appear=0A>$main->destroy(); # =
this destroys the main dialog box=0A>print "Button pushed: $button\n";=0A>=
=======
>=0A>which has a difference of the the line reading=
"$dialog->transient('');"=0A>=0A>Steve=0A>=0A>On Jul 16, 2007, at 1:56 PM,=
Steve Waltner wrote:=0A> > We've been running ActivePerl 5.8.0.806 on Wind=
ows for some time and=0A> > recently upgraded to ActivePerl 5.8.8.817. Alon=
g the way (ActivePerl=0A> > 5.8.4) the Perl Tk module was upgraded to 804.0=
27. Previously, it had=0A> > been using 800.???. While Perl 5.8.8 fixed the=
original problem we=0A> > had, it=0A> > introduced a problem where the beh=
avior of DialogBox changed and our=0A> > dialog boxes are no longer being d=
isplayed. A code snippet that=0A> > demonstrates this is:=0A> >=0A> > =3D=
=======0A> > use Tk;=0A> > use Tk::DialogBox;=0A> >=0A> > $main=
=3D MainWindow->new(); # this creates the main dialog box=0A> > $dialog=
=3D $main->DialogBox (-title =3D> "TITLE BAR TEXT", -buttons =3D>=0A> > [ =
"Button 1","Button 2" ] ); # this creates the desired box=0A> > $main->with=
draw(); # this makes the main dialog box=0A> > invisible=0A> > $=
button =3D $dialog->Show(); # this makes the desired dialog box=0A> > ap=
pear=0A> > $main->destroy(); # this destroys the main dialog bo=
x=0A> > print "Button pushed: $button\n";=0A> > =======
> >=
=0A> > The problem is that the user wants to hide the main window and still=
=0A> > show the DialogBox. With version 4.x of DialogBox.pm, the "withdraw"=
=0A> > that hides $main also keeps $dialog from being shown on the screen.=
=0A> >=0A> > How should one code it where you hide the main Tk window, but =
are=0A> > still allowed to show a DialogBox created off the main window?=0A=
> >=0A> > Steve=0A> >=0A> > _______________________________________________=
=0A> > ActivePerl mailing list=0A> > ActivePerl@listserv.ActiveState.com=0A=
> > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs=0A>=0A>_=
______________________________________________=0A>ActivePerl mailing list=
=0A>ActivePerl@listserv.ActiveState.com=0A>To unsubscribe: http://listserv.=
ActiveState.com/mailman/mysubs=0A
--Next_1184698028---0-202.54.124.153-13998
Content-type: text/html;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
=0AHi All,
=0A 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 piec=
e 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 calli=
ng the transient method,but still the problem persists.Is this a known issu=
e with 5.8.8.
=0A
=0Asub waitCommand {
=0A my ($mainW=
indow, $label) =3D @_;
=0A
=0A my $dialog =3D $mainWindo=
w->Dialog (-title =3D> "Working... please wait",
=0A&nbs=
p; -text =3D> $label, -bitmap =3D>=
"hourglass", -buttons =3D> []);
=0A #$dialog-=
>transient("");
=0A $dialog->Popup();
=
=0A $dialog->update();
=0A $dialog->with=
draw();
=0A}
=0A
=0A
=0A
=0AOn Tue, 17 Jul 2007 Steve=
Waltner wrote :
=0A>BTW, I was given a solution on the ptk mailing l=
ist. The code snippet
=0A>should read:
=0A>
=0A>===3D=
====
=0A>use Tk;
=0A>use Tk::DialogBox;
=0A>
=
=0A>$main =3D MainWindow->new(); # this creates the main=
dialog box
=0A>$dialog =3D $main->DialogBox (-title =3D> "=
;TITLE BAR TEXT", -buttons =3D>
=0A>[ "Button 1",&q=
uot;Button 2" ] ); # this creates the desired box
=0A>$dialog-&g=
t;transient('');
=0A>$main->withdraw(); =
# this makes the main dialog box invisible
=0A>$button=
=3D $dialog->Show(); # this makes the desired dialog box a=
ppear
=0A>$main->destroy(); &nbs=
p; # this destroys the main dialog box
=0A>print "Button pushed=
: $button\n";
=0A>=======3D
=0A>
=0A>whi=
ch has a difference of the the line reading "$dialog->transient('')=
;"
=0A>
=0A>Steve
=0A>
=0A>On Jul 16, 2007, at=
1:56 PM, Steve Waltner wrote:
=0A> > We've been running ActivePer=
l 5.8.0.806 on Windows for some time and
=0A> > recently upgraded =
to ActivePerl 5.8.8.817. Along the way (ActivePerl
=0A> > 5.8.4) t=
he Perl Tk module was upgraded to 804.027. Previously, it had
=0A> &g=
t; been using 800.???. While Perl 5.8.8 fixed the original problem we
=
=0A> > had, it
=0A> > introduced a problem where the behavio=
r of DialogBox changed and our
=0A> > dialog boxes are no longer b=
eing displayed. A code snippet that
=0A> > demonstrates this is:
R>=0A> >
=0A> > =======3D
=0A> > use Tk=
;
=0A> > use Tk::DialogBox;
=0A> >
=0A> > $main =
=3D MainWindow->new(); # this creates the main dialog box
R>=0A> > $dialog =3D $main->DialogBox (-title =3D> "TITLE =
BAR TEXT", -buttons =3D>
=0A> > [ "Button 1",&qu=
ot;Button 2" ] ); # this creates the desired box
=0A> > $main=
->withdraw(); # this makes the =
main dialog box
=0A> > invisible
=0A> > $button =3D $dial=
og->Show(); # this makes the desired dialog box
=0A> =
> appear
=0A> > $main->destroy(); =
# this destroys the main dialog box
=0A> > print &=
quot;Button pushed: $button\n";
=0A> > =======3D<=
BR>=0A> >
=0A> > The problem is that the user wants to hide =
the main window and still
=0A> > show the DialogBox. With version =
4.x of DialogBox.pm, the "withdraw"
=0A> > that hides $m=
ain also keeps $dialog from being shown on the screen.
=0A> >
=
=0A> > How should one code it where you hide the main Tk window, but =
are
=0A> > still allowed to show a DialogBox created off the main =
window?
=0A> >
=0A> > Steve
=0A> >
=0A> &g=
t; _______________________________________________
=0A> > ActivePe=
rl mailing list
=0A> > ActivePerl@listserv.ActiveState.com
=0A&=
gt; > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
=
=0A>
=0A>_______________________________________________
=0A>=
;ActivePerl mailing list
=0A>ActivePerl@listserv.ActiveState.com
=
=0A>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
=
=0A
=0A
ng=3D0 cellpadding=3D0 style=3D'font-family:Verdana;font-size:11px;line-hei=
ght:15px;'>
ck.cgi/www.rediff.com/signature-home.htm/1050715198@Middle5/ 1301360_1294995=
/1300737/1?PARTNER=3D3&OAS_QUERY=3Dnull target=3Dnew '>
madworks.rediff.com/cgi-bin/AdWorks/adimage.cgi/1301360_1294 995/creative_13=
00737.gif alt=3D'cj' border=3D0> |
--Next_1184698028---0-202.54.124.153-13998--
--===============0791331464==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0791331464==--