I have a GWT application with a JSONObject which must be passed to a
javascript function which will make some calculations, which will then
be returned to the calling GWT app.
ie:
JSONObject json = new JSONObject();
json.put("x", 2);
json.put("y", 5);
JSONObject result = process(json)
Window.alert("sum="+result.get("sum"));
Window.alert("average="+result.get("avg"));
public native JSONObject process(json) /*-{
return $wnd.myJavascriptFunction(json);
}-*/;
My question is what is the correct way to reference the JSON object
within my javascript function, and when it must return my results in
another JSON obejct how do I do this in javascript.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---