I swear I looked for 30 seconds+ for typos and even copypasted the
package name, but, of course, I typoed the field name. Ignore this, my
bad.

On Jan 4, 8:23 am, Reinier Zwitserloot <reini...@gmail.com> wrote:
> I tried to do something fairly simple:
>
> package testpackage;
>
> public class MyClass {
>   @SuppressWarnings("unused")
>   private JavaScriptObject rawMap = JavaScriptObject.createObject();
>
>   private native void setSomething(String x) /*-{
>       th...@testpackage.client.myclass::rawMap["foo"] = x;
>   }-*/;
>
>   private native String getSomething() /*-{
>      return th...@testpackage.client.myclass::rawMap["foo"];
>   }-*/;
>
> }
>
> but it doesn't work - 'rawMap' doesn't exist according to GWT. (member
> not found; expect subsequent errors). Yet when I replace my rawMap
> with an identical line, except making rawMap an int, the error goes
> away. I've worked around it with non-JSNI wrapper methods that pass
> the JSO into and out of JSNI methods, but shouldn't the above code
> just work?
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to