Shedokan
unread,Jun 20, 2010, 11:55:51 AM6/20/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
I have this Class:
package com.testproject.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class Test implements EntryPoint {
/**
* This is the entry point method. Initialize you GWT module here.
*/
public void onModuleLoad() {
// Writes Hello World to the module log window.
GWT.log("Hello World!", null);
GWT.log(getUserAgent(), null);
}
public static native String getUserAgent() /*-{
return navigator.userAgent.toLowerCase()
}-*/
}
Everything should work fine but somehow I get these three errors:
Native methods do not specify a body
Syntax error on token ")", { expected after this token
Syntax error, insert "}" to complete ClassBody
Can anyone tell me what is the problem?
Thanks