Aw: Re: how to cancel a scheduled command?
Ahhh you are right! I totally forgot that. I mostly use Timer because I haven't repeating tasks that can decide on its own if they should continue or not. -- J. -- 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/-/ouBaPZkjfNYJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: how to cancel a scheduled command?
Here is the answer: The execute() method of Scheduler.RepeatingCommand returns a boolean. If true, then the command will be invoked again. If false, it will be cancelled. public interface RepeatingCommand { /** * Returns true if the RepeatingCommand should be invoked again. */ boolean execute(); } On Jul 21, 2:13 pm, Jens wrote: > Hm I don't think so. But you can use GWT's Timer class instead. It has a > cancel() method as well as a scheduleRepeating(int delayInMillis) method. > > -- J. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Aw: how to cancel a scheduled command?
Hm I don't think so. But you can use GWT's Timer class instead. It has a cancel() method as well as a scheduleRepeating(int delayInMillis) method. -- J. -- 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/-/3CyDe9nAr8UJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
how to cancel a scheduled command?
I scheduled a command using: Scheduler.get().scheduleFixedPeriod(RepeatingCommand, int); Is there any way to cancel the command once scheduled? -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.