Discussion:
Timer in GWT?
Dennis Madsen
2009-12-14 11:21:08 UTC
Permalink
I'm trying to have a Java Timer in my EntryPoint:

Timer timer = new Timer();
timer.schedule(
new TimerTask() {
public void run() {
//some code
}
}
, 5000);

But when trying to compile this I got:
No source code is available for type java.util.Timer; did you forget
to inherit a required module?
No source code is available for type java.util.TimerTask; did you
forget to inherit a required module?

What to do?

--

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-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Ian Bambury
2009-12-14 14:03:11 UTC
Permalink
Use the GWT timer


Ian

http://examples.roughian.com
Post by Dennis Madsen
Timer timer = new Timer();
timer.schedule(
new TimerTask() {
public void run() {
//some code
}
}
, 5000);
No source code is available for type java.util.Timer; did you forget
to inherit a required module?
No source code is available for type java.util.TimerTask; did you
forget to inherit a required module?
What to do?
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.
--

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-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Hasan Turksoy
2009-12-14 15:48:05 UTC
Permalink
you should use "import com.google.gwt.user.client.Timer;"...
see StockWatcher tutorial for a sample :
http://code.google.com/webtoolkit/doc/latest/tutorial/codeclient.html

Hasan
                Timer timer = new Timer();
                timer.schedule(
                        new TimerTask() {
                    public void run() {
                        //some code
                    }
                }
                        , 5000);
No source code is available for type java.util.Timer; did you forget
to inherit a required module?
No source code is available for type java.util.TimerTask; did you
forget to inherit a required module?
What to do?
--

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-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to google-web-toolkit+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Loading...