Re: if, idle, stay open (again, sorry)
Re: if, idle, stay open (again, sorry)
- Subject: Re: if, idle, stay open (again, sorry)
- From: email@hidden
- Date: Sun, 7 Jan 2001 15:41:06 EST
In a message dated 01/05/01 12:14:42, "Jason W. Bruce" <email@hidden>
writes:
<< Scripts with "if" statements inside idle handlers in 9.04 are
subject to random crashes. My experience has been that this is the case
even if you remove the "if" statement from inside the idle handler and place
it in a separate handler which the idle handler calls -- though Jim Lindholm
indicated several weeks ago that this approach solved his problem. >>
Indeed... I have not had a Type 2 crash with my stay-open applet (that
functions only as an idle handler) since I removed all code that was within
the "on idle" routine. The only lines within the "on idle" routine is a call
to another handler that contains all of the code I moved out and a return
statement ie:
on idle
handler
return 1
end
The handler has the same if statements in it that were previously in the "on
idle" routine.
I don't if I was crashing because of the bug or bad code on my part. I had
posted my code on 3 different lists and no one indicated that I had something
wrong with the code... other than the info about the bug. All I know is that
it would crash somewhere up to a dozen times a day and now it doesn't crash
at all.
BTW, I'm running OS 8.6 and AppleScript 1.3.7... Jim