Monday, May 31, 2010

Using JavaScript Overlay Types for Nested JavaScriptObjects

I have this in my html and I can use JavaScriptOverlay types no
problem and it works:

var properties = {"width":640, "height":480};

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".

var properties = {"property":{"canvasWidth":1920, "canvasHeight":
1200, "width":640, "height":480, "fps":15, "bgcolor":"#FFFFFF"}};

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
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment