In reality, if the second button depends upon the response of some XHR triggered by a click of the first button, even a timer is a poor choice.
You would want to use callbacks. have a look at the short explanation here: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/faca1575f306ba0f/3be719c021aa19bd -jason On May 28, 2009, at 11:05 AM, Adil BENHAMID wrote: > as an example I want to display a button then wait two seconds > before displaying the next one. > > 2009/5/28 Adil BENHAMID <[email protected]> > I would like to to make a temporization between two calls. > > 2009/5/28 Jason Essington <[email protected]> > > > Thread is not part of java that is emulated in GWT. Javascript is > single threaded so thread.sleep() has no meaning, you might as well do > while(true); (I don't actually suggest doing that) > > What is it that you are trying to accomplish with Thread.sleep()? > > -jason > > On May 28, 2009, at 10:37 AM, Adil Ben wrote: > > > > > Hello, > > > > I need to call the method Thread.sleep() in my GWT code. But GWT > does > > not integrate this class. > > How to solve this? > > > > i get the following error > > "No source code is available for type java.lang.Thread; did you > > forget to inherit a required module?" > > > > Regards. > > > > > > > > > > > > -- > ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`° > Adil BENHAMID > º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø > > > > > -- > ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`° > Adil BENHAMID > º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
