I've got a major problem that started happening after upgrading from 4.0 to 5.5, and I desperately need help.
I make a lot of "quizzing" type programs that basically present a user a question, they type an answer, click a button submit it and move on. The code I have used to do this for the longest time is like this:
Code: Select all
--present question
put "How old are you?" into fld "question" of card "question"
select the text of fld "response" of card "question"
--wait for response
put false into gButtonClicked
wait until gButtonClicked is true with messages
--record answer
put fld "response" of card "question" into tResponse
Interestingly, the problem sort of goes away if I nest the wait command into a repeat loop, like this:
Code: Select all
repeat until gButtonClicked is true
wait 5 milliseconds with messages
end repeat
The most frustrating part is that these problems almost exclusively occur when the program is run as a standalone, and the program typically works fine when run in LiveCode Studio. Debugging is so much fun when the problem is intermittent and you have to generate a standalone each time you want to see if something made a difference!
Anyways, I'm majorly pissed about all of this. I was really excited about updating, and this has completely screwed me up. I use the wait command in conjunction with text entry fields so much, they are critical to everything I do. It seems to me that it has something to do with how LiveCode compiles the standalones now. I can save the same exact stack file as a standalone using 4.0 and it works fine, but is completely screwy when generated from 5.5.
Does anyone have any insight into this problem? Has anyone else experienced it? Any good timing alternatives? If it matters I'm running OS X 10.8, and using 5.5.1. Colleagues running 10.7 and using 5.5.2 have reported the same problems to me.