2016년 12월 28일 수요일

Priority for fusion tables request


I don't know why, but my procedure to request fusion tables is always set as priority one in a block no matter what I put before.
In this example, i try to change the color and the text of the button that trigger the fusion tables request.
The request only should happen when the button changed, but in reality, the button change only when the request is finished.
Any idea why ?

--
Your delay procedures are probably the culprit.  Delay procedures are generally a very bad idea with AppInventor Programming  ...see this for an explanation of how things happen in AI  http://josmasflores.blogspot.com/2013/02/a-single-thread-of-execution-in-app.html  (the graphics are from AI Classic, however, the principle is the same for AI2).

Check out Lyn's explanation and Scotr's Wait or delay method fail  that uses a Clock.

This appears to be a timing issue.

-- 
Thanks for your explained Steve. I'm using delay because i send à lot of differents request to the same fusion table and when the results come back, it's à mess without it.
Maybe there is à better way to do it ?

--
the fusiontable works aysnchronously: first you send something and in the GotResult event you receive something

just use the following logic and use a global variable to find out, which action you have to take
send request 1
receive the result of request 1 in the GotResult event, then send request 2
receive the result of request 2 in the GotResult event, then send request 3
etc.

-- 

댓글 없음:

댓글 쓰기