Thanks for the advice - I thought it was something like that but didn't know what to do about it. I'll give it a go today
The Window and MessageBox come from GWT-Ext On Apr 7, 4:00 pm, Thomas Broyer <[email protected]> wrote: > On 7 avr, 16:13, Gary1975 <[email protected]> wrote: > > > Hi, > > > I am relatively new to GWT devlopment and was wondering of someone > > could please help to explain why the progress dialog is not displaying > > in the following function. Also, the "timeperiod" window is not hiding > > itself until after the line has been drawn. Any ideas would be > > gratefully received as I have been struggling with this all day. > > JavaScript in the browser is single-threaded, and moreover runs in the > UI thread. This means that changes to the page are only reflected when > your script "yields", i.e. in your case at the end of your onClick > method. > > The simplest way to make it work as you're expecting is to use a > DeferredCommand: wrap everything that follows timepedior.hide() and > MessageBox.show(...) within a DeferredCommand; this would "yield" so > the browser can effectively hide the "timeperiod" and show the > MessageBox and then (something like 10ms later) do the drawing and > close the MessageBox. > > (btw: which library are those Window and MessageBox coming from?) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
