Re: spurious timeout on nth Apple event on Snow Leopard
Re: spurious timeout on nth Apple event on Snow Leopard
- Subject: Re: spurious timeout on nth Apple event on Snow Leopard
- From: Simon Topliss <email@hidden>
- Date: Wed, 07 Oct 2009 15:35:11 +0100
On 7 Oct 2009, at 11:48, Hamish Sanderson wrote: That would indicate there's a variable, presumably in the Apple Event Manager, that increments each time an event is dispatched. The variable is a C short (16-bit integer), so on every 65536th event it overflows and goes back to 0. (The first run will almost certainly be low, as some number of Apple events will have been sent before you started your tests.) I'm going to guess that either 0x0000 or 0xFFFF has some special meaning, which is causing the return event to be not recognised or lost altogether.
I may be wrong, but my first suspicion would be a problem in how the Apple Event Manager is auto-generating return IDs for outgoing events. (AEReturnID is a SInt16, and 0xFFFF has a special meaning: kAutoGenerateReturnID.) The return ID is used to match up an incoming reply event with the original outgoing event, so if the incoming event has the wrong return ID, the sending application (in this case, AppleScript Editor) won't match it up to the outgoing event. As a result, the sending application will never realise that it's received a response; hence the timeout error.
Yeah, that's what I thought but wanted you to work it out for yourselves. It's the only way you'll learn.
:)
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden