Finally found one.
dunbarx at aol.com
dunbarx at aol.com
Mon Oct 1 22:25:49 EDT 2012
Finally found reproducible scripts that work as advertised when stepping through in the deBugger, but do not when simply run. This gremlin has been sighted, like the Yeti, by nominally sane people, but never caught.
Make two buttons. Name one "start". Name the other "stop".
in btn "start":
on mouseUp
put the seconds + 8 into tSecs
showrandoms tSecs
end mouseUp
In btn "stop":
on mouseup
send "showRandoms" && 0 to this card
end mouseup
In the card script:
on showRandoms tSecs
put random(99)
if tSecs = 0 then
exit to top
end if
if tSecs > the seconds then send "showRandoms" && tSecs to me in 0 millisecs
end showRandoms
Try it. If you press the "start" button, you get random numbers in msg for eight seconds. If you press the "stop" not while this is going on, nothing happens.
If you place a breakpoint at the "exit to top" line in the card script. the handler is caught there, and if you then step through, you exit. The "stop" button resets the variable "tSecs" to a value that will force showRandoms to end. And it does, but only if you step through, not if you run it. The variable watcher shows a "0" as the value of tSecs, as it should, and the conditional tosses you out of the handler. As it should.
But not in a normal run, only in the debugger.
I have been chasing this since 1987. I am not crazy. I have pictures. I will start a support group.
Craig Newman
More information about the use-livecode
mailing list