• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question


  • Subject: Question
  • From: Michelle Steiner <email@hidden>
  • Date: 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
my displaydialog("area", myAnswer ^ 2 * pi)
end if
else
display dialog invalid
end if
on error
display dialog invalid
end try

on displaydialog(inputString, theNumber)
display dialog "The " & inputString & " is " & ,
theNumber buttons {"Yeah man"}
end displaydialog

----------------------------------------------------------------------
| Michelle Steiner | Hard as it may be to believe, my |
| email@hidden | life has been based on a true story. |
----------------------------------------------------------------------


  • Follow-Ups:
    • Re: Question
      • From: Jolly Roger <email@hidden>
  • Prev by Date: Re: Parent path. Senility?
  • Next by Date: Re: Question
  • Previous by thread: Re: Finder's open event has properties? Cal?
  • Next by thread: Re: Question
  • Index(es):
    • Date
    • Thread