No luck here..

I tried making the changes found in the file in the link I offered
earlier.  Running with the new code produces the following error when
I attempt to retrieve a list of objects each with a Date attribute.

com.google.gwt.dev.shell.HostedModeException: Something other than an
int was returned from JSNI method
'@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::readInt()':
JS double value 3.693265408E9 out of range for a int
        at com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:
256)
        at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144)
        at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeInt(ModuleSpace.java:
242)
        at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeInt(JavaScriptHost.java:
75)
        at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.readInt(ClientSerializationStreamReader.java)
        at
com.google.gwt.user.client.rpc.core.java.util.Date_CustomFieldSerializer.instantiate(Date_CustomFieldSerializer.java:
21)

I don't know how to resolve this.  So this strategy probably won't
work for me.

Note that the new gwt-user.jar file, like the previous, does not get
uploaded to the server with the rest of the project.  I didn't need to
before and I didn't do it now.  I simply recompiled my project with
the new gwt-user.jar on the build path.  And then I created a war file
from the war directory and uploaded that war file.

The changes to the Date_CustomFieldSerializer class are in the
instantiate and serialize methods..

public static Date instantiate(SerializationStreamReader streamReader)
throws SerializationException {
        //    return new Date(streamReader.readLong());
        return new
Date(streamReader.readInt(),streamReader.readInt(),streamReader.readInt(),
streamReader.readInt(),streamReader.readInt());
}

public static void serialize(SerializationStreamWriter streamWriter,
Date instance) throws SerializationException {
        //    streamWriter.writeLong(instance.getTime());
        streamWriter.writeInt(instance.getYear());
        streamWriter.writeInt(instance.getMonth());
        streamWriter.writeInt(instance.getDate());
        streamWriter.writeInt(instance.getHours());
        streamWriter.writeInt(instance.getMinutes());
}

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

Reply via email to