Re: question about JSNI

2008-11-10 Thread bw
It seems the problem only occurs in hosted mode. When I run it in an actual browser, everything works (tested in firefox 3.0). As far as I can tell, the javascript code generated with the PRETTY flag is fine. Java code like: long now = System.currentTimeMillis(); MyDate temp = new MyDate(now); g

JSNI question

2008-11-10 Thread bw
Hi, I need to create my own date class to handle UTC. When I try to construct a MyDate object, I get a "java.lang.NoSuchFieldError: mydate" exception in this code: private native void init(double date) /*-{ this.mydate = new Date(date); }-*/; Anybody know why? thanks for any help -Ben

JSNI question

2008-11-10 Thread bw
Hi, I need to create my own date class to handle UTC. When I try to construct a MyDate object, I get a "java.lang.NoSuchFieldError: mydate" exception in this code: private native void init(double date) /*-{ this.mydate = new Date(date); }-*/; Anybody know why? thanks for any help -Ben

Problems with JSNI and inheritance: Malformed JSNI reference 'jsdate';

2008-11-07 Thread bw
Hi, I'm subclassing java.util.Date on the client side and adding the following methods: public native int getUTCHours() /*-{ return this.jsdate.getUTCHours(); }-*/; public native int getUTCMinutes() /*-{ return this.jsdate.getUTCMinutes(); }-*/; public native int getUTCSeconds