Re: if, idle, stay open (again, sorry)
Re: if, idle, stay open (again, sorry)
- Subject: Re: if, idle, stay open (again, sorry)
- From: "Jason W. Bruce" <email@hidden>
- Date: Fri, 05 Jan 2001 12:14:42 +0000
John Christie <email@hidden> asked:
>
Can someone refresh me on the story here with if's in idles
>
of stay opens locking things up (9.0.4, all updates)? Is there a
>
work around? It's a timer so I need some kind of conditional (put
>
the if in a subhandler?).
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.
Workarounds would include using a repeat statement and then using
"delay" from the standard additions or "pause for" from Akua Sweets. Eric
Grant's Sleep Commands are also a substitute for idle handlers, but I've
never used them. Finally, instead of a repeat loop, you could have a
handler recursively call itself after using the above methods to yield
processor cycles, but I have read on this list that there are issues with
recursion in AppleScript. I've also read on this list that the bug is fixed
in 9.1.
Jason Bruce