hi,

i have the following JSNI class:


package com.sample;

import com.google.gwt.core.client.JavaScriptObject;

public class SampleClass {
 private JavaScriptObject dateObject;
 public SampleClass() {
 dateObject = createNewJSDateObject();
}
 private SampleClass(JavaScriptObject dateObject) {
 this.dateObject = dateObject;
}
 private native JavaScriptObject createNewJSDateObject() /*-{
 return new Date();
}-*/;
 public native String format(String stringFormat) /*-{
 return [email protected]::dateObject.format(stringFormat);
}-*/;
}

Unfortunately it doesn't work, at runtime i get the error, that this:

return [email protected]::dateObject.format(stringFormat);

is not allowed. At the dateObject position it says, "*missing ; before 
statement*". But i don't quite understand that.
How would i have to write it instead?

Thank you.

-- 
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.

Reply via email to