Re: when quit is not quit
Re: when quit is not quit
- Subject: Re: when quit is not quit
- From: Jon Pugh <email@hidden>
- Date: Sun, 4 Nov 2001 08:05:40 -0800
At 10:26 PM -0700 11/3/2001, Donald S. Hall wrote:
>
I am not sure what "the next time AppleScript returns" means exactly. Is
>
there anyway to force this to happen?
Yes, throw an error.
For example:
quit
error number -128 -- user cancelled
This will cause everything after the error statement to be skipped, although execution will pass to whatever active error handler exists.
There is no way to make quit not return. You need to make the flow of control after the quit get you to a return statement or the end of a handler block.
Another possibility is:
quit
return
But this doesn't work for nested handlers (i.e. a handler which calls another handler) since you only return from the current handler.
Jon