Re: Script Applet rejects first handler call
Re: Script Applet rejects first handler call
- Subject: Re: Script Applet rejects first handler call
- From: Deivy Petrescu <email@hidden>
- Date: Wed, 1 Aug 2001 09:53:39 -0400
At 9:52 PM -0700 7/31/01, Christopher Nebel wrote:
On Tuesday, July 31, 2001, at 09:19 AM, Paul Skinner wrote:
on 7/31/01 11:29 AM, email@hidden wrote:
Here's something annoying: When I call a handler in a script applet from
another script, I get an error on the first call.
Any thoughts on how to restore the normal behavior? Barring that,
does anyone
know which version of AppleScript I should revert to to regain the old
behavior?
I see this as normal behavior. I had no idea that it ever worked
differently.
Ah, no. This is a known bug in the applet shell that was introduced
in AppleScript 1.6 and should be fixed in the next release. The
only workaround (aside from dropping back to 1.5.5 or earlier) is to
launch the applet first.
--Chris Nebel
AppleScript Engineering
Not to contradict you, but according to AppleScript guide for 1.3.7 (page 310):
"Instead, the Tell statement launches the script application and sends it an
implicit Run command. The application handles that Run command.
AppleScript then gets to the explicit Run command in the calling script and
tries to send another run event to the script application. Unfortunately, the
application has already handled its one event and quits without responding to
the second Run command. The calling script waits in vain until it
times out, and
then receives an error.
The culprit is the implicit Run command sent by the Tell statement when it
launches the application. To launch a non-stay-open application and run its
script, use a Launch command followed by a Run command, like this:..."
So it was something documented in 1.3.7 as a normal behavior.
Regards
Deivy Petrescu
http://www.dicas.com