Re: Stay-open applet - problems on quitting
Re: Stay-open applet - problems on quitting
- Subject: Re: Stay-open applet - problems on quitting
- From: julifos <email@hidden>
- Date: Thu, 13 Nov 2003 11:53:42 +0100
>
Greetings,
>
>
I'm working on a stay-open applet which is causing me grief when
>
quitting. It's a long story & has taken a lot of debugging to nail
>
down, but basically what I've discovered is that when the app is quit
>
via Cmd-q, it enters its 'quit' handler immediately, regardless of
>
whatever else it's doing. This is happening under OS10.2.6, AS1.9.1.
>
>
Where it bites me is if it's asked to quit when in the middle of
>
executing its 'idle' routines, which can take some time. It appears to
>
stop what it's doing, execute 'quit' then go back to where it was in
>
the idle routines. My quit handler zeros out the variables the idle
>
handler was using, so the idle handler then errors out.
>
>
My questions are:
>
>
Is this the way it's supposed to work?
>
If yes, then why?
>
Either way, can anyone suggest a robust method for dealing with the
>
behaviour?
Hi, Richard.
You described the correct behaviour. You may take a look to this:
<
http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScript
LangGuide/AppleScript.e9.html>
The "robust method" may depend on what's going on in your code...
Cheers ;-)
jj
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.