[Pythonmac-SIG] python, hypercard and apple events

Jack Jansen jack@oratrix.nl
Wed, 15 Mar 2000 00:07:07 +0100


Recently, Jeff Senn <senn@maya.com> said:
> Oops - I was typing too fast: the error was -10012
> 
> The only apparent difference with my (python generated events) and the
> ones from another application (e.g. script editor) seem to be a
> (non-default?) "tid" (transaction ID?) exists in the Python ones (that
> must be put there by the low-level AE code...)

And error -10012 is (surprise, surprise:-) errAENoSuchTransaction.

And I finally found (thanks!) where this transaction-id problem with
Python was hiding: the script that generates the AE module (most
toolbox modules are generated with a set of scripts that parse Apple's 
.h header files) mistakenly had AEtransactionID as a short in stead of 
a long. So the top 16 bits of every transaction ID (or is that the
bottom?) contained random garbage. This will be fixed in the next
release, and in the mean time if you build Python from source you can
easily fix it by changing AE_AECreateAppleEvent in AEmodule.c: the
format specifier should be "O&O&O&hl" (in stead of "O&O&O&hh").
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm