For Programmers: Free Programming Magazines  


Home > Archive > PerlTk > May 2005 > Unspecified error with Quick Draw program









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Unspecified error with Quick Draw program
Dave

2005-05-10, 8:57 pm

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?


Dave

2005-05-10, 8:57 pm


"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.



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com