[gwt-contrib] Questions about @JsProperty and JsType.prototype()

2014-06-30 Thread 田传武
Hi, When i translate a pure java library to a javascript library using JsInterop, i get confused about @JsProperty and JsType.prototype(). The java code looks like this: @JsType @JsNamespace("$wnd.realtime.store") public class TextInsertedEvent { /** * The index of the change. */ pub

Re: [gwt-contrib] Re: Dropping IE8 support in useragent-less GWT

2014-06-30 Thread 'Goktug Gokdogan' via GWT Contributors
On Mon, Jun 30, 2014 at 8:46 PM, Colin Alworth wrote: > Sounds great, but is there a reason that we're now starting at IE9+ and > not IE10+, thus giving us typed arrays, web workers, web sockets, etc? I > only ask because the kind of case where you are giving up User (and Widget, > RPC, Timer, an

[gwt-contrib] Re: Dropping IE8 support in useragent-less GWT

2014-06-30 Thread Colin Alworth
Sounds great, but is there a reason that we're now starting at IE9+ and not IE10+, thus giving us typed arrays, web workers, web sockets, etc? I only ask because the kind of case where you are giving up User (and Widget, RPC, Timer, and other fairly high-level apis) seems to suggest that you mig

Re: [gwt-contrib] Translated to null.nullField when using JsInterop & @JsType

2014-06-30 Thread 田传武
Hi Daniel, I just tried the code you provided, unfortunately, the explicit class cast workaround does not solve this issue. The translated javascript code is the same as before. Thanks! On Monday, June 30, 2014 11:18:12 PM UTC+8, Daniel Kurka wrote: > > I have seen this happening before when t

Re: [gwt-contrib] Translated to null.nullField when using JsInterop & @JsType

2014-06-30 Thread 田传武
Hi Ray, Here is the source for CollaborativeOperation: https://github.com/goodow/realtime-operation/blob/master/src/main/java/com/goodow/realtime/operation/impl/CollaborativeOperation.java the final project which depends on realtime-operation: https://github.com/goodow/realtime-store (Using the .

[gwt-contrib] Dropping IE8 support in useragent-less GWT

2014-06-30 Thread 'Goktug Gokdogan' via GWT Contributors
We are planning to drop support for IE8 if the application doesn't inherit c.g.gwt.useragent.UserAgent and hence not have browser permutations. Nearly all of today's apps inherit User so they will not be affected by this change. In the future more apps will only inherit Core however they shouldn't

Re: [gwt-contrib] Translated to null.nullField when using JsInterop & @JsType

2014-06-30 Thread 'Ray Cromwell' via GWT Contributors
Can you post the full source for CollaborativeOperation? My guess is the UserID and SessionID fields are being proven by the compiler to be uninstantiated types. Are userId/sessionId simple Strings, or some other type? . On Mon, Jun 30, 2014 at 8:18 AM, 'Daniel Kurka' via GWT Contributors wrote:

Re: [gwt-contrib] Translated to null.nullField when using JsInterop & @JsType

2014-06-30 Thread 'Daniel Kurka' via GWT Contributors
I have seen this happening before when the pruner removes a type that he does not consider live but actually is live. Fast try, can you change: final CollaborativeOperation first = operations. get(0); to: final CollaborativeOperation first = (CollaborativeOperation) operations. get(0); -Daniel

Re: [gwt-contrib] Translated to null.nullField when using JsInterop & @JsType

2014-06-30 Thread 田传武
I'm sure this is an optimizer bug. null.nullField causes the following error at runtime: SEVERE: (TypeError) : Cannot read property 'nullField' of nullcom.google.gwt .core.client.JavaScriptException: (TypeError) : Cannot read property 'nullField' of null at Unknown.$compose(http: //local

Re: [gwt-contrib] Translated to null.nullField when using JsInterop & @JsType

2014-06-30 Thread John A. Tamplin
Generally, null.nullField means the compiler can prove the value is null at that point, and draft compile skills the optimization that defects a lot of that. So either it really is always null, or there is an optimizer bug. On Jun 30, 2014 10:31 AM, "田传武" wrote: > Hello, > The newest @JsType fea

[gwt-contrib] Translated to null.nullField when using JsInterop & @JsType

2014-06-30 Thread 田传武
Hello, The newest @JsType feature is really very fascinating, and works in most cases. The only issue i found was the wrong null.nullField javascript output. the compile command: java -cp xxx com.google.gwt.dev.Compiler -war xxx -XnoclassMetadata -XnocheckCasts -XjsInteropMode JS -XclosureCom