alistairrutherford / gwtsimiletimeline

GWT API library to support SIMILE Timeline within the GWT framework.
0 stars 0 forks source link

loadJSON #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'd written my own Simile wrapper before I saw your version, but mine was
very bare bones and I'd like to switch over to yours to take advantage of
all the good work you've done. 

The one bit of functionality I need in order to switch over is to be able
to loadJSON strings. I find this works better for me than using XML.

Would you consider adding this? I've included the necessary changes below.

EventSourceImpl.java
public native static void loadJSON(String jsonString,String url,EventSource
eventSource)/*-{
    var jsonData = eval('(' + jsonString + ')')             
        eventSource.loadJSON(jsonData, url);    
    }-*/;

EventSource.java
public void loadJSON(String jo) {
        EventSourceImpl.loadJSON(jo,GWT.getModuleBaseURL(),this);
    }

TimeLineWidget.java
public void loadJSON(String jo) {
        eventSource.loadJSON(jo);               
    }   

Original issue reported on code.google.com by jdw...@gmail.com on 26 Feb 2007 at 10:44

GoogleCodeExporter commented 9 years ago
Well done jdwyah. I have been thinking about JSON support but not got round to 
it yet. 

Original comment by alistair.rutherford on 1 Apr 2007 at 6:13

GoogleCodeExporter commented 9 years ago

Original comment by alistair.rutherford on 1 Apr 2007 at 6:14

GoogleCodeExporter commented 9 years ago

Original comment by alistair.rutherford on 16 Apr 2007 at 8:06