Re: if, idle, stay open - PROVE IT
Re: if, idle, stay open - PROVE IT
- Subject: Re: if, idle, stay open - PROVE IT
- From: "Donald S. Hall" <email@hidden>
- Date: Sat, 6 Jan 2001 23:30:38 -0700
- Re: if, idle, stay open - PROVE IT
- Re: if, idle, stay open - PROVE IT
- Re: if, idle, stay open - PROVE IT
Try the following test script on OS 9.0.4. For me this crashes in about 15
minutes with IE5.0 running, faster, it seems, if IE has more than one window
open. Doesn't matter if it is saved as a classic applet or a Mac OS X applet:
property checkInterval : 30 -- check for new action times every this many
seconds
global today -- day of the week of today as a string
on run
beep 2
set today to word 1 of date string of (current date)
set theList to {{"test item", (current date) + 1 * days}}
end run
-- idle handler ---------------------------------------------------------
-- runs every checkInterval seconds
on idle
copy today to previousToday
--set today to word 1 of date string of (current date)
set today to (current date)
checkTheList() -- is it time to take action?
return checkInterval -- run this handler again after this many seconds have
passed
end idle
-- check to see if an action time has passed -----------------------------
to checkTheList()
--do stuff
end checkTheList
On Friday, January 5, 2001, at 05:38 PM,
email@hidden wrote:
I REALLY need some empirical evidence of this, as ALL of my scripts
with idle handlers have if statements and I've had exactly 1 crash
that wasn't due to my own bad code.
(I add tasks to a list and then idle through that list in order
to allow the server to continue working while the script progresses)
My experience makes me want to decry this as a rumor, but it's so
persistently brought up I feel compelled to give it some credence...
Is there a test case script out there that succintly demonstrates this crash?
Is there a timeframe over which these suppossed crashes do not occur?
(As I'm not seeing it in the 2-12 hours runs I use...)
~Phi