Code Comments
Programming Forum and web based access to our favorite programming groups.I have typed in the quick draw program from p221 of Mastering Perl/Tk,
modifying it a bit to allow use strict, use warnings (on Windows XP)
The following error is given when I try to run it:
at C:/Perl/site/lib/Tk.pm line 228.
i.e. There is an error but no message. By use of print statements and eval I
have deduced that it is the line:
$canvas->bind("<Button-1>", [\&start_drawing, Ev('x'), Ev('y')]);
that is causing the error in the module, but I cannot see why.
Any thoughts?
Post Follow-up to this message
"Dave" <daveandniki@ntlworld.com> wrote in message
news:A07ge.706$yY4.683@newsfe5-win.ntli.net...
>I have typed in the quick draw program from p221 of Mastering Perl/Tk,
>modifying it a bit to allow use strict, use warnings (on Windows XP)
>
> The following error is given when I try to run it:
>
> at C:/Perl/site/lib/Tk.pm line 228.
>
> i.e. There is an error but no message. By use of print statements and eval
> I have deduced that it is the line:
>
> $canvas->bind("<Button-1>", [\&start_drawing, Ev('x'), Ev('y')]);
>
> that is causing the error in the module, but I cannot see why.
>
> Any thoughts?
>
>
Sorry I posted too hastily and found the answer myself. The code seems to be
in error and replacing the bind method by CanvasBind fixes it.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.