I've been tracking down an error that occurs when scripting my
app. At first I assumed that it was a bug in my homegrown Carbon-
based Apple Event handling code, but now I'm starting to think it
might be a bug in Applescript...
Recently, I added code to set the keyAppHandledCoercion parameter
in the reply to typeBoolean true when the requested type matched my
class type. This was enough to make simple coercions like these
work correctly:
tell application "Life Balance"
task 1 of document 1 as task
end tell
tell application "Life Balance"
item 1 of every task of document 1 as task
end tell
However, when I try something more complex:
tell application "Life Balance"
item 1 of (every task of document 1 as list) as task
end tell
I get the error:
Can't make <class Task> id "1797703789526674182" of
document id 1 of application "Life Balance" into
type <class Task>."
The reason I think this might be a bug in AppleScript is that in
all three cases I'm returning exactly the same result from my core/
getd handler:
reply = 'aevt'\'ansr'{ '----':'obj '{ 'want':'Task', 'from':'obj
'{ 'want':'docu', 'from':''null''(), 'form':'ID ', 'seld':1 },
'form':'ID ', 'seld':"1797703789526674182" }, 'idas':1 }, err = 0
Is there a chance that Applescript is failing to notice that I've
set the keyAppHandledCoercion parameter in this third case?
Best wishes,
--Stuart A. Malone
Llamagraphics, Inc.
Makers of Life Balance personal coaching software
http://www.llamagraphics.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-implementors/
email@hidden
This email sent to email@hidden