• 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
Re: Repeat-Dialog-Error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Repeat-Dialog-Error


  • Subject: Re: Repeat-Dialog-Error
  • From: Richard 23 <email@hidden>
  • Date: Wed, 28 Feb 2001 22:00:34 -0800

>Why when I click the cancel button, do I get the
>"Cancel failed" dialog.

"Cancel" is treated as a special case by display dialog which
generates an error number -128 when the "Cancel" button is
clicked by the user.

The same is not true of "choose from list", probably because it
wasn't originated by Apple, although it probably should have been
added for consistency.

Invariably I add this to scripts which use choose from list:

-- ---------------------------------------------------------
-- Preprocessed by Convert Script 1.0d4
-- ---------------------------------------------------------
-- author: Richard 23, date: Wednesday, February 28, 2001
-- ---------------------------------------------------------
repeat
choose from list {"foo", "bar"} with empty selection allowed
if result = false then
error number -128
else if result = {} then
exit repeat
else
display dialog "You chose " & result
end if
end repeat
display dialog "Goodbye, kind user!"
-- ---------------------------------------------------------

R23


  • Prev by Date: Re: list (form data) to Record
  • Next by Date: Re: folder action help
  • Previous by thread: Re: Repeat-Dialog-Error
  • Next by thread: Re: Repeat-Dialog-Error
  • Index(es):
    • Date
    • Thread