Help with URL blocking/non-blocking code
Posted: Wed Dec 03, 2014 6:03 pm
Windows 7 - Livecode 7.0.1 (rc 2)
Got a URL that is a PHP file that I call in a separate handler in an OpenStack. It posts the date/time into a MySql database table. The line of code after it "types" a sentence into a feedback field. Using the SEND: "send "TypeInfo" to me in 20 milliseconds" to enter the characters into the field. The typing pauses until the PHP URL handler finishes posting the date/time in the database. Tried post/get/put/load and all "seem" to be blocking. I might be misunderstanding this but I thought using GET would would execute its line of code and then go on to the rest of the script but it definitely waits until a response from the GET script.
Not exactly all the code but something like this:
on OpenStack
PostDateTime
put "Click the MENU button above to start." into TheInfo
TypeInfo
end OpenStack
------------------------------
on PostDateTime
GET URL ".../PostDateTime.php"
end PostDateTime
------------------------------
on TypeInfo
if InfoChar <= TotalChars then
put char InfoChar of TheInfo after field "Feedback"
send "TypeInfo" to me in 20 milliseconds
end if
end TypeInfo
Thanks for any help.
Got a URL that is a PHP file that I call in a separate handler in an OpenStack. It posts the date/time into a MySql database table. The line of code after it "types" a sentence into a feedback field. Using the SEND: "send "TypeInfo" to me in 20 milliseconds" to enter the characters into the field. The typing pauses until the PHP URL handler finishes posting the date/time in the database. Tried post/get/put/load and all "seem" to be blocking. I might be misunderstanding this but I thought using GET would would execute its line of code and then go on to the rest of the script but it definitely waits until a response from the GET script.
Not exactly all the code but something like this:
on OpenStack
PostDateTime
put "Click the MENU button above to start." into TheInfo
TypeInfo
end OpenStack
------------------------------
on PostDateTime
GET URL ".../PostDateTime.php"
end PostDateTime
------------------------------
on TypeInfo
if InfoChar <= TotalChars then
put char InfoChar of TheInfo after field "Feedback"
send "TypeInfo" to me in 20 milliseconds
end if
end TypeInfo
Thanks for any help.