Greetings perl-win32-users,

Providing a script the demonstrates the problem as per $Bill's
suggestion. The script runs fine but fails with the above listed error
message when I try to make an exe with parlapp. Here is the script.
The error messages and portion of stayOnTop that the errors refer to
are copied again below.

use strict;
use Tk;
use Tk::StayOnTop;

my $on_top = 0;
my $maintitle = "Test Stay On Top";
my $backcolor = "#DCA5FF";

my $mw = MainWindow->new(
-background=> "$backcolor",
-borderwidth=>4,
-relief=>'ridge');
$mw-> title ($maintitle);

my $bodytext_font = $mw->fontCreate(-family=>"times",-size => 14);

my $canvas = $mw->Scrolled('Canvas',-height => 100, -width =>200)->pack();
my $c = $canvas-> Subwidget("canvas");

my $bttn = $c-> Button(-text => "On Top", -background=>'pink', -command => 
\&on_top);
my $id = $c-> createWindow(100, 75, -window => $bttn);

sub on_top{
        if ($on_top == 0){
                $on_top = 1;
                $mw->stayOnTop;
                $mw->update;
        }
        else {
                $on_top = 0;
                $mw->dontStayOnTop;
                $mw->update;    
        }
}
MainLoop;

> Not sure what group to post this to so I am trying this one first.
> 
> I have a perl TK script that uses StayOnTop. It works fine when I run
> it from Komodo but when I try to make an exe with PerlApp, it does not
> work. I have installed StayOnTop with the graphical PPM and the module
> is in site\lib\tk as expected. When I test from perlapp, I get the
> error message listed below. I have also pasted the relevant portion of
> StayOnTop.pm.
> 
> Bareword found where operator expected at
> /<D:\Perl\program_changer.exe>Tk/StayOnTop.pm line 107, near "case
> METHOD_ATTRIB"         (Do you need to predeclare case?) syntax error
> at /<D:\Perl\program_changer.exe>Tk/StayOnTop.pm line 99, near ") {"
> syntax error at /<D:\Perl\program_changer.exe>Tk/StayOnTop.pm line
> 107, near "case METHOD_ATTRIB " Global symbol "$obj" requires explicit
> package name at /<D:\Perl\program_changer.exe>Tk/StayOnTop.pm line
> 108. BEGIN failed--compilation aborted at program_changer.pl line 6.

You need to supply the smallest *complete* script that you can that
reproduces your problem.  Nobody can run what you posted in it's current
form.  Strip your script down to something simple that fails like your
current script does - then run it to make sure it reproduces the problem
correctly and cut-n-paste it here.

> Not sure what group to post this to so I am trying this one
Re > first.
>  > I have a perl TK script that uses StayOnTop. It works fine when I
run > it from Komodo but when I try to make an exe with PerlApp, it
does not > work. I have installed StayOnTop with the graphical PPM and
the module > is in site\lib\tk as expected. When I test from perlapp,
I get the > error message listed below. I have also pasted the
relevant portion of > StayOnTop.pm. >  > Bareword found where operator
expected at > /<D:\Perl\program_changer.exe>Tk/StayOnTop.pm line 107,
near "case > METHOD_ATTRIB"         (Do you need to predeclare case?)
syntax error > at /<D:\Perl\program_changer.exe>Tk/StayOnTop.pm line
99, near ") {" > syntax error at
/<D:\Perl\program_changer.exe>Tk/StayOnTop.pm line > 107, near "case
METHOD_ATTRIB " Global symbol "$obj" requires explicit > package name
at /<D:\Perl\program_changer.exe>Tk/StayOnTop.pm line > 108. BEGIN
failed--compilation aborted at program_changer.pl line 6.

You need to supply the smallest *complete* script that you can that
reproduces your problem.  Nobody can run what you posted in it's current
form.  Strip your script down to something simple that fails like your
current script does - then run it to make sure it reproduces the problem
correctly and cut-n-paste it here.

--
Best regards,
Spencer Chase        mailto:[EMAIL PROTECTED]
67550 Bell Springs Rd.
Garberville, CA 95542  Postal service only.
Laytonville, CA 95454  UPS only.
[EMAIL PROTECTED]
http://www.spencerserolls.com
http://www.spencerserolls.com/MidiValve.htm
(707) 984-8356

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to