[gwt-contrib] Static fields on JavaScriptObjects

2013-03-16 Thread Daniel Kurka
Hello Everyone, I am a little confused about some issues I encountered on the issue tracker and need some help. This one is about a static field on a JSO: https://code.google.com/p/google-web-toolkit/issues/detail?id=8060 From the docs: Overlay types cannot have instance fields. The fields

Re: [gwt-contrib] Static fields on JavaScriptObjects

2013-03-16 Thread John A. Tamplin
On Sat, Mar 16, 2013 at 3:09 PM, Daniel Kurka kurka.dan...@gmail.comwrote: I am a little confused about some issues I encountered on the issue tracker and need some help. This one is about a static field on a JSO: https://code.google.com/p/google-web-toolkit/issues/detail?id=8060 From the

Re: [gwt-contrib] Static fields on JavaScriptObjects

2013-03-16 Thread Daniel Kurka
Thanks John for clearing this up. This was exactly what I had in mind. I will close the issue AsDesigned, maybe we should document this is little better. -Daniel Am 16.03.2013 um 20:40 schrieb John A. Tamplin j...@jaet.org: On Sat, Mar 16, 2013 at 3:09 PM, Daniel Kurka kurka.dan...@gmail.com

Re: [gwt-contrib] Static fields on JavaScriptObjects

2013-03-16 Thread Colin Alworth
The problem with this answer is that the failure is silent and surprising for Java developers, and that the optimizations can make it even more so. If I recall correctly, calling a static method in the same type from an instance method is not enough to get the static initializer called - an

Re: [gwt-contrib] Static fields on JavaScriptObjects

2013-03-16 Thread John A. Tamplin
On Sat, Mar 16, 2013 at 5:30 PM, Colin Alworth niloc...@gmail.com wrote: The problem with this answer is that the failure is silent and surprising for Java developers, and that the optimizations can make it even more so. If I recall correctly, calling a static method in the same type from an

Re: [gwt-contrib] Static fields on JavaScriptObjects

2013-03-16 Thread Daniel Kurka
Am 16.03.2013 um 22:43 schrieb John A. Tamplin j...@jaet.org: On Sat, Mar 16, 2013 at 5:30 PM, Colin Alworth niloc...@gmail.com wrote: The problem with this answer is that the failure is silent and surprising for Java developers, and that the optimizations can make it even more so. If I

Re: [gwt-contrib] Static fields on JavaScriptObjects

2013-03-16 Thread Colin Alworth
If you call a method or access a field from pure JS, you aren't going to get the JSO implementation - com.google.gwt.dom.client.Element.removeClassName(String) doesn't exist in the underlying browser, so we build it in Java, and talk to methods/fields which *do* exist in the browser. In other