• 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: Daniel Shockley <email@hidden>
  • Date: Wed, 28 Feb 2001 22:23:01 -0800 (PST)

> Message: 5
> Date: Wed, 28 Feb 2001 18:45:02 -0800
> Subject: Repeat-Dialog-Error
> From: Brad Giesbrecht <email@hidden>
> To: AS list <email@hidden>
>
> Hello,
>
> <snip>
> try
> repeat while (not done)
> set x to the button returned of --optionreturn
> (display dialog "" buttons {"Cancel", "Look", "Continue"} as text
> set done to true
> if x is "Look" then
> process_windows()
> set done to false
> end if
> end repeat
> on error
> display dialog "Cancel failed."
> end try
> <snip>
>
> Why when I click the cancel button, do I get the
> "Cancel failed" dialog.


Paul made some good points about how the "Cancel" button genereating an actual error is a good
thing. Nevertheless, if you want a Cancel button that just acts like a regular old button, name it
" Cancel " Notice the spaces on each end of the name? AppleScript generates the "User Cancelled
error when a button named "Cancel" is clicked and released, but " Cancel " is just another button
with a text name.

Hope that helps,


=====
Daniel A. Shockley
email@hidden
http://www.danshockley.com
http://www.krioni.com

And now for a message from my sponsor... *grin*
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/


  • Follow-Ups:
    • Re: Repeat-Dialog-Error
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: folder action help
  • Next by Date: Re: Repeat-Dialog-Error
  • Previous by thread: Re: Repeat-Dialog-Error
  • Next by thread: Re: Repeat-Dialog-Error
  • Index(es):
    • Date
    • Thread