Enums in overlay types

2010-10-12 Thread Hilco Wijbenga
Hi all, I am using an enum in one of my overlay types: public final class DefaultLevelBean implements LevelBean { public static final LevelBean create() { final DefaultLevelBean level = (DefaultLevelBean) JavaScriptObject.createObject(); return level; } protected DefaultLevelBean()

Re: Enums in overlay types

2010-10-13 Thread Nathan Wells
This is just a idea, but you may need to do the following (note that I skip error checking for brevity here): public Level getLevel() { return Level.valueOf(getNativeLevel()); } public void setLevel(Level level) { setNativeLevel(level.name()); } private native String getNativeL

Re: Enums in overlay types

2010-10-13 Thread Hilco Wijbenga
On 13 October 2010 05:30, Nathan Wells wrote: > This is just a idea, but you may need to do the following (note that I > skip error checking for brevity here): > >  public Level getLevel() { >    return Level.valueOf(getNativeLevel()); >  } > >  public void setLevel(Level level) { >    setNativeLe

Re: Enums in overlay types

2010-10-15 Thread Nathan Wells
According to this http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideMarshaling and this http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideJavaFromJavaScript you need to do something like this