Re: Forcing an applet to quit
Re: Forcing an applet to quit
- Subject: Re: Forcing an applet to quit
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 08 Jan 2001 13:14:46 -0800
On 1/8/01 12:45 PM, "Marc K. Myers" <email@hidden> wrote:
>
Paul Berkowitz wrote:
>
> Date: Mon, 08 Jan 2001 11:00:22 -0800
>
> Subject: Re: Forcing an applet to quit
>
> From: Paul Berkowitz <email@hidden>
>
> To: Applescript-Users <email@hidden>
>
>
>
> On 1/8/01 10:50 AM, "Stephen Gross" <email@hidden> wrote:
>
>
>
>> How can I make an applet abort? I know I can use "return x," from the
>
>> main routine, but what if I want it to bomb out from a subroutine?
>
>>
>
>
>
> error number -128
>
>
>
> Is equivalent to "Cancel" and will end it from anywhere.
>
>
I tried this:
>
>
on run
>
beep
>
doIt()
>
beep
>
end run
>
>
on doIt()
>
error -128
>
end doIt
>
>
as well as a bunch of other things in the handler that would make AS
>
unhappy ("set a to 1 / 0"). In each case, the script beeped twice. I
>
was surprised that it returned from the handler after the error. Is
>
there a way to halt execution in the handler itself?
>
It doesn't beep twice OMM - only once. You might be hearing the first beep,
interrupted. Cut out the first beep and you shouldn't hear anything.
--
Paul Berkowitz