Re: Using JavaScript Overlay Types for Nested JavaScriptObjects

2010-06-10 Thread Olivier Monaco
Hi, Imagine you have this in your HTML page: - ... window.data = { "prop1" : { "prop2": 42 } }; ... - First create a JSO for the "prop1" value: class InnerJSO extends JSO { protected InnerJSO() {} public native int getProp2() /*-{ return this.prop2; }-*/; } Second cre

Re: Using JavaScript Overlay Types for Nested JavaScriptObjects

2010-06-09 Thread bluedes
i've figured it out.. one can nest javascriptobjects and just access the nested object thru jsni.. =) On May 31, 9:22 pm, powwow wrote: > I have this in my html and I can use JavaScriptOverlay types no > problem and it works: > >   >         var properties = {"width":640, "height":480}; >   > >

Re: Using JavaScript Overlay Types for Nested JavaScriptObjects

2010-06-09 Thread bluedes
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

Using JavaScript Overlay Types for Nested JavaScriptObjects

2010-06-02 Thread powwow
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 th