>>> playRec = praem.Applet.initwithname('playRec')
>>> recList = playRec.callsub('listRecDict')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "praem.py", line 9, in callsub
self.event('ascrpsbr', {'snam': name, '----': args}).send()
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/aeosa/aem/send/send.py", line 101, in send
raise CommandError(err[0], err.args[1:] and err[1] or '', None)
aem.send.send.CommandError: CommandError -1708: the AppleEvent was
not handled by any handler
but i do have a handler:
on listRecDict()
set tdl to {}
set n to 0
repeat with rec in recList
set n to n + 1
set end of tdl to rec's toDict(n)
end repeat
return tdl
end listRecDict
is there something else that has to be done to get the handler
recognized?
thanx
My bad, I forgot to lowercase the subroutine names in my Python
script. Internally, AppleScript lowercases subroutine names unless
they're written within pipes, e.g. 'FooBar' should be called as
'foobar', '|FooBar|' as 'FooBar'. So the correct code should be: