tk_messagebox 
Author Message
 tk_messagebox

Does perl/Tk have the equivalent of the tcl/tk tk_messagebox? Is so, could
someone provide me with an example of how to use display a message box?

Thanks in advance,

Alfred Forbrich



Wed, 25 Jun 2003 00:33:13 GMT  
 tk_messagebox

Quote:
> Does perl/Tk have the equivalent of the tcl/tk tk_messagebox? Is so, could
> someone provide me with an example of how to use display a message box?

Look for the Tk::messageBox man page.

        use strict;
        use Tk;
        my $mw = tkinit;
        $mw->Button(
                -text    => 'Box',
                -command => sub {
                        $mw->messageBox(
                                -type    => 'YesNo',
                                -message => 'Happy New Year?',
                        )
                },
        )->pack;
        MainLoop;

--
Marc Dashevsky  (remove "_" from address to reply by e-mail)



Wed, 25 Jun 2003 01:01:09 GMT  
 tk_messagebox
In particular, I'm looking to be able to prompt someone with the messagebox.
In TCL/Tk you could specify a -type option. Is this possible in Perl/Tk?

THanks,

ALfred


Quote:
> Does perl/Tk have the equivalent of the tcl/tk tk_messagebox? Is so, could
> someone provide me with an example of how to use display a message box?

> Thanks in advance,

> Alfred Forbrich



Wed, 25 Jun 2003 01:01:36 GMT  
 tk_messagebox
I keep getting the following error when I try to use messageBox

Tk::Error: Goto undefined subroutine &MainWindow::messageBox at
/opt/wdc/apps/pd/share/perl/site_perl/PA-RISC1.1/site_perl/Tk/Widget.pm line
310.
 Tk::Widget::AUTOLOAD at
/opt/wdc/apps/pd/share/perl/site_perl/PA-RISC1.1/site_perl/Tk/Widget.pm line
310
 main::__ANON__ at msg_test.pl line 19
 \&main::__ANON__
 Tk callback for .button
 Tk::Button::butUp at
/opt/wdc/apps/pd/share/perl/site_perl/PA-RISC1.1/site_perl/Tk/Button.pm line
103
 (command bound to event) at
/opt/wdc/apps/pd/share/perl/site_perl/PA-RISC1.1/site_perl/auto/Tk/Error.#!/
usr/local/bin/perl

Is messageBox only for TCL/Tk? I see something called message in Perl/Tk but
that doesn't do what I want either.

Any other suggestions.

Thanks,

Alfred Forbrich


Quote:
> > Does perl/Tk have the equivalent of the tcl/tk tk_messagebox? Is so,
could
> > someone provide me with an example of how to use display a message box?

> Look for the Tk::messageBox man page.

> use strict;
> use Tk;
> my $mw = tkinit;
> $mw->Button(
> -text    => 'Box',
> -command => sub {
> $mw->messageBox(
> -type    => 'YesNo',
> -message => 'Happy New Year?',
> )
> },
> )->pack;
> MainLoop;

> --
> Marc Dashevsky  (remove "_" from address to reply by e-mail)



Wed, 25 Jun 2003 03:16:15 GMT  
 tk_messagebox
Looks like the Unix Version of Perl/Tk that I'm running doesn't support the
messageBox widget. The activePerl version does.

Thanks,

Alfred Forbrich


Quote:
> In particular, I'm looking to be able to prompt someone with the
messagebox.
> In TCL/Tk you could specify a -type option. Is this possible in Perl/Tk?

> THanks,

> ALfred


> > Does perl/Tk have the equivalent of the tcl/tk tk_messagebox? Is so,
could
> > someone provide me with an example of how to use display a message box?

> > Thanks in advance,

> > Alfred Forbrich



Wed, 25 Jun 2003 03:26:06 GMT  
 tk_messagebox

Quote:
> I keep getting the following error when I try to use messageBox

> Tk::Error: Goto undefined subroutine &MainWindow::messageBox at
> /opt/wdc/apps/pd/share/perl/site_perl/PA-RISC1.1/site_perl/Tk/Widget.pm line 310.

I'm running Tk version 8.23.  What version of Tk are you running?
As best as I can determine, messageBox has been in Tk since the
summer of 1998.

--
Marc Dashevsky  (remove "_" from address to reply by e-mail)



Wed, 25 Jun 2003 04:08:16 GMT  
 tk_messagebox
Works with activePerl so my Unix version must be out of date.

Thanks,

Alfred Forbrich


Quote:
> > I keep getting the following error when I try to use messageBox

> > Tk::Error: Goto undefined subroutine &MainWindow::messageBox at
> > /opt/wdc/apps/pd/share/perl/site_perl/PA-RISC1.1/site_perl/Tk/Widget.pm
line 310.

> I'm running Tk version 8.23.  What version of Tk are you running?
> As best as I can determine, messageBox has been in Tk since the
> summer of 1998.

> --
> Marc Dashevsky  (remove "_" from address to reply by e-mail)



Wed, 25 Jun 2003 04:25:08 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Error using MsgBox or tk_messageBox

 

 
Powered by phpBB® Forum Software