The code executed flawlessly for me with v800.015. What version of Tk are
you running? Anything above 800.015 is buggy. According to the ptk mailing
list 800.021 is supposed to be pretty good with only a few known issues
involving the NoteBook widget. 800.022 which is due out very soon is
expected to be free of the known bugs.
If you are running 800.015 double check your code for syntax errors. If
your running 800.021 either downgrade to 800.015 or wait for 800.022 to come
out. If your running anything in-between, upgrade to 800.021 (now available
through PPM) and see if that helps.
I have a .ppd version of 800.015 if you'd like me to send it to you.
wantor
> -----Original Message-----
> From: Scott K Purcell [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 09, 2000 8:00 PM
> To: Perl-Win32-Users Mailing List
> Subject: TK Canvas Problem
>
>
> Hello,
> I am trying to learn some TK on the side here, and have a
> canvas error I
> can't figure out.
> This comes straight out of the "Advanced Perl Programming"
> book. page 231
> and 232.
>
> Since 231 is very simple, I will include it here and page 232
> below in case
> someone wants to try and run these.
>
> The error on both of these when run from a command line is:
> bad screen distance "fill" at c:/Perl/site/lib/Tk.pm line 217.
>
> Anyway, this is just homework for me, and not holding up any
> jobs or hot
> things at the office. But I would like to figure out why the error.
> # canvas1.pl
> #! perl
> use Tk;
> $top = MainWindow->new();
> $canvas = $top->Canvas(width=>200, height=>100)->pack(); #
> this much runs
> $id = $canvas->create('line',
> 10, 10, 100, 100,
> fill=>'red');
> MainLoop();
>
> # canvas2.pl
> #! perl
>
> use Tk;
>
> $top = MainWindow->new();
> $canvas = $top->Canvas(width=>300, height=> 245)->pack();
> # draw a set of circles along an archimedean spiral
> # the centers of these circles move along the spiral
> # (radius of spiral = constant * theta)
>
> $origin_x = 110; $origin_y = 70;
> $PI = 3.1415926535;
> $circle_radius = 5;
> $path_radius = 0;
>
> for ($angle = 0; $angle <=180;
> $path_radius += 7, $circle_radius +=3, $angle += 10) {
> $path_x = $origin_x + $path_radius * cos($angle * $PI / 90);
> $path_y = $origin_y - $path_radius * sin ($angle * $PI / 90);
> $canvas->create('oval',
> $path_x - $circle_radius,
> $path_y - $circle_radius,
> $path_x + $circle_radius,
> $path_y + $circle_radius,
> fill=>'yellow');
> $canvas->create('line', $origin_x, $origin_y, $path_x,
> $path_y, fill=>
> 'slategray');
> }
> MainLoop();
>
> ---
> You are currently subscribed to perl-win32-users as:
> [EMAIL PROTECTED]
> To unsubscribe, forward this message to
> [EMAIL PROTECTED]
> For non-automated Mailing List support, send email to
> [EMAIL PROTECTED]
>
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]