Monday, February 27, 2012

Re: GWT Timer doesn't work

Try this,

           Timer timer = new Timer() {
                 public void run() {
                     // Do Rpc. i.e., retrieveCollection

                     @Override
                     public void onFailure(Throwable throwable) {
                         // if needed
                         timer.schedule(100);
                     }

                     @Override
                     public void onSuccess(Result result) {
                         // do logic
                         timer.schedule(100);
                     }
                 }
             };
             timer.schedule(100);


On Mon, Feb 27, 2012 at 4:08 AM, Patrick Tucker <tuckerpmt@gmail.com> wrote:
You should execute the Timer right away, by directly calling its
run().  Then in the run() determine whether or not it needs to run
again.  If so, use schedule(int) to make it run() again.  The process
should be similar to how an IncrementalCommand would work...

On Feb 24, 3:36 pm, "Peter D." <thesilentp...@gmail.com> wrote:
> Has a solution been found to this issue?  I have encountered the same
> thing, with no luck.
>
> On Jan 19, 2:24 am, Hanna Varakhobava <h.varakhob...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hey, somebody...

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
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.




--
Santosh Kumar K

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
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