AppleScript Studio Application - Annoying Delays
AppleScript Studio Application - Annoying Delays
- Subject: AppleScript Studio Application - Annoying Delays
- From: Paul Scott <email@hidden>
- Date: Fri, 29 May 2009 15:58:21 -0700
I've written an AppleScript Studio application that exhibits a strange
behavior on quit. Very often it will not immediately quit when it
should, but will hang for a few seconds or more, and then eventually
quit. To debug the problem, I put a "display dialog" as the *last
line* of the "on will quit" handler, and it always (100% of the time)
displays *immediately* on quit, but when I dismiss the dialog the
application spins the beach ball for awhile before quitting. Of
course, the delay happens whether or not the "display dialog" is
there; it was inserted just to prove the point.
Any idea what could be causing this?
All my other AppleScript Studio applications do not exhibit this
behavior, even those with the same basic structure -- that is, it runs
a shell script in background when a button is clicked, and uses the
"on idle" handler once per second to test whether the process has
ended, then advances to the next file to process.
There is a caveat that might be of interest in resolving this problem.
I have noticed that "POSIX path of file" also hangs periodically in
the same application for a few seconds; it runs in the "on idle"
handler. As far as I can tell, no other lines of code experience any
delay whatsoever.
So far, I've only tested this on a MacBook Pro (2.16Ghz Intel Core
Duo), which has no third-party software on it; I recently reloaded a
fresh copy of Mac OSX Leopard, installed all the software updates, and
then installed the most recent Developer tools. Clean system.
Why the annoying delays? and how to get rid of ''em?
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden