Code: Select all
on mouseUp
put 0 into sTestLinesCompleted
send runTests to me
end mouseUp
on runTests
repeat with sLineNum = (sTestLinesCompleted+1) to sTotalTestLines
put line sLineNum of field fTestWords into sTestWord
add 1 to sTestLinesCompleted
send firstTest to me
end repeat
end runTests
on firstTest
put 1 into sTestNum
put "get "&&sTestWord into it
do it // Error here kills this handler
put it into sValueReturned
send secondTest to me
end firstTest
on secondTest
put 2 into sTestNum
put "get the"&&sTestWord into it
do it // Error here kills this handler
put it into sValueReturned
end secondTest
on errorDialog pExecutionError, pParseError
put line (item 1 of line 1 of pExecutionError) of the cErrorsList of card 1 of stack "revErrorDisplay" into sErrorReturned
if (sTestNum = 1) then
send secondTest to me
else
send runTests to me
end if
end errorDialog
Any thoughts? For a while I thought it was some kind of race condition, but after experimenting with waits it doesn't seem to be the case.
Thanks, Walt