pkt1583 / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
0 stars 0 forks source link

we should have MemoryProxy( JavascriptObject obj) constructor, right? #392

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
 here MenoryProxy.java
 public MemoryProxy(Object[][] data) {
        jsObj = create(JavaScriptObjectHelper.convertToJavaScriptArray(data));
    }
    MemoryProxy( JavascriptObject data){
      jsObj = create(data);
    }
    protected native JavaScriptObject create(JavaScriptObject data) /*-{
        return new $wnd.Ext.data.MemoryProxy(data);
    }-*/;

why not some thing like :
 public MemoryProxy(Object[][] data) {
        jsObj =  
create(JavaScriptObjectHelper.convertToJavaScriptArray(data));
    }

    protected native JavaScriptObject create(JavaScriptObject data) /*-{
        return new $wnd.Ext.data.MemoryProxy(data);
    }-*/;

more power ?

Original issue reported on code.google.com by myname74...@gmail.com on 18 Aug 2008 at 9:11

GoogleCodeExporter commented 8 years ago
If the constructor should accept a JavaScriptObject, it would be the actual 
jsObj. 
Why have it create based on the JavaScript?

Original comment by mlim1...@gmail.com on 30 Aug 2008 at 8:23