Re: Script Applet rejects first handler call
Re: Script Applet rejects first handler call
- Subject: Re: Script Applet rejects first handler call
- From: email@hidden
- Date: Tue, 31 Jul 2001 17:02:16 EDT
Scott,
I haven't tested this, but I strongly suspect you have discovered another
symptom of the CGI startup bug in Applescript 1.6 that I identified a few
months ago. If so, revert to Applescript 1.5.5. Chris Nebel has told me the
bug has been found, so I assume the fix will be in the next release (please
please don't break anything else! : )
1.4.3 - stay open scripts won't
1.5.5 - read/write broken
1.6 - direct handler calls to non running scripts broken
Jeff Baumann
email@hidden
www.linkedresources.com
Lasso coders marvel at the speed of my pseudodatabases.
In a message dated 7/31/01 12:48:36 PM, Scott Norton 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.
>
>
-- "Test": saved as a stay-open Classic applet
>
on run
>
say "Run"
>
end run
>
>
on h()
>
say "Handler"
>
end h
>
>
I save that script, and call it with this one:
>
>
tell application "Test"
>
h()
>
end tell
>
>
If "Test" is running, everything works as expected. But if it isn't, I get
the
>
error "Can't continue h". The error number is -1708 (errAEEventNotHandled).
>
>
This is under OS 9.1 with CarbonLib 1.3.1, AppleScript 1.6, and Script Editor
>
1.6. It also occurs if the scripts are compiled with Smile or with Script
>
Editor 1.1.3. It doesn't occur if I boot into OS 8.6 and AppleScript 1.
>
>
I understand that I can avoid the error by precautionarily telling the server
>
script to run before invoking any of its handlers, but that's not the way
>
AppleScript is supposed to work. Also, I have some scripts that are called
from
>
ListSTAR, and these can not be guarded with a "run", since ListSTAR doesn't
have
>
a script itself, it just sends <<event s9evts9Lis>> events at the scripts.
>
>
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?
>
--
>
Scott Norton Phone: +1-703-299-1656
>
DTI Associates, Inc. Fax: +1-703-706-0476
>
2920 South Glebe Road Internet: email@hidden
>
Arlington, VA 22206-2768 or email@hidden