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?
Wait command error; all commands executed at the end
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Wait command error; all commands executed at the end
First guess is to add "with messages" to the wait statements.
Second guess has yet to be formulated.
Second guess has yet to be formulated.
Re: Wait command error; all commands executed at the end
hey there josh, folowing code seems to be working well.
Code: Select all
on mouseUp
put empty into fld "Debug Field"
get theTime(1)
wait 1 sec with messages
get theTime(2)
wait 1 sec with messages
get theTime(3)
wait 1 sec with messages
end mouseUp
function theTime tNum
put "Time"&&tNum&return after fld "Debug Field"
end theTime
Knowledge is meant to be shared.