Tuesday, October 4, 2011

Create custom callbacks to achieve synchronous code execution

It seems that Dev Mode code runs synchronously... Otherwise I can't explain a bug that occurs only in production mode where the results are already there before a table has been cleaned to receive those new results and still has its outdated results. So both are mixed, although I call "cleanView()" before "getResults()". But this doesn't matter because JS runs asynchronously. So getResults() is executed before cleanView(). What I need is synchronous code execution, I need a callback.

How can achieve that getResults() will be only executed once clearView() has done its job? Basically I need to call getResults() in a clearView() callback.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/8XpKL3tZH6gJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment