Re: Question
Re: Question
- Subject: Re: Question
- From: Nigel Garvey <email@hidden>
- Date: Mon, 4 Dec 2000 02:11:51 +0000
Michelle Steiner wrote on Sun, 3 Dec 2000 16:49:54 -0800:
>
What unforeseen side effect does this script have, and why does it have
>
it? (Yeah, I know the answer, but I first had to experience the side
>
effect, because I did not foresee it when I wrote the script.)
>
>
--Michelle
>
>
set invalid to "What the????"
>
>
display dialog "enter the radius" default answer ,
>
"" buttons {"Compute diameter", " Compute area"}
>
set {myAnswer, myButton} to ,
>
{text returned, button returned} of the result
>
>
try
>
if myAnswer as number is greater than 0 then
>
if myButton is "compute cirumference" then
>
my displaydialog("cirumference", myAnswer * 2 * pi)
>
else
[snip]
Aha! The first button should be "Compute circumference" and the spelling
in the inner 'if' block should be corrected to match.
NG