i also have the same problem..

i have this setup:

public class Entry extends JavaScriptObject
{
        protected Entry() { }
        public final native String getWidth() /*-{ return
this.Width; }-*/;
        public final native String getHeight()  /*-{ return
this.Height;  }-*/;
}

public class ResponseEntries extends JavaScriptObject
{
        protected ResponseEntries() { }
        public final native String getStatus() /*-{ return
this.Status; }-*/;
        public final native JsArray<Entry> getEntries()  /*-{ return
this.Entries;  }-*/;
}


the json string looks like this, but i can't seem to create the proper
js overlay type.. how to nest javascriptobjects??

{ "Status":"Success", "Entries":
[ { "Width":10, "Height":20 }, { "Width":15, "Height":25 } ] }

On May 31, 9:22 pm, powwow <jimmy.w...@gmail.com> wrote:
> I have this in my html and I can use JavaScriptOverlaytypesno
> problem and it works:
>
>  <script>
>         var properties = {"width":640, "height":480};
>  </script>
>
> public class Properties extends JavaScriptObject
> {
>         protected Properties() { }
>
>         public final native String getWidthString() /*-{ return this.width; }-
> */;
>         public final native String getHeightString()  /*-{ return
> this.height;  }-*/;
>
> }
>
> However, when I start nesting objects like below I do not know how to
> extract the "property" object from "properties".
>
>  <script>
>         var properties = {"property":{"canvasWidth":1920, "canvasHeight":
> 1200, "width":640, "height":480, "fps":15, "bgcolor":"#FFFFFF"}};
>  </script>
>
> What do I need to do to get the "properties" object, and then get to
> the "property" object?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to