Wait command error; all commands executed at the end
Posted: Tue Jan 20, 2015 7:35 am
My colleague has run into this problem that has halted development of a larger program. I'm only providing a stripped version of his issue so that others may offer advice.
on mouseUp
wait 1 second
put "Time 1" into line 1 of field "Debug Field"
wait 1 second
put "Time 2" into line 2 of field "Debug Field"
wait 1 second
put "Time 3" into line 3 of field "Debug Field"
end mouseUp
Instead of executing as you would expect, all three commands are executed simultaneously after three seconds. I've seen this firsthand. To add to the puzzle, the code behaves properly when I copypaste it into my livecode. Does anyone have any idea why this is happening?
on mouseUp
wait 1 second
put "Time 1" into line 1 of field "Debug Field"
wait 1 second
put "Time 2" into line 2 of field "Debug Field"
wait 1 second
put "Time 3" into line 3 of field "Debug Field"
end mouseUp
Instead of executing as you would expect, all three commands are executed simultaneously after three seconds. I've seen this firsthand. To add to the puzzle, the code behaves properly when I copypaste it into my livecode. Does anyone have any idea why this is happening?