You should use the class - JsonpRequestBuilder
See
http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/jsonp/client/JsonpRequestBuilder.html

--Sri



On 8 April 2010 02:14, markww <[email protected]> wrote:

> Hi,
>
> I'm reading through this excellent article about supporting jsonp in
> our gwt apps:
>
>
> http://code.google.com/webtoolkit/articles/using_gwt_for_json_mashups.html
>
> I'm not that familiar with javascript, and the following function is
> worrying me:
>
>  public native static void setup(Hax0r h, String callback) /*-{
>    $wnd[callback] = function(someData) {
>      [email protected]::handle(Lcom/google/gwt/
> core/client/JavaScriptObject;)(someData);
>    }
>  }-*/;
>
> so will:
>
>    $wnd[callback] = ....;
>
> ever get cleaned up? The rest of the functions in the article don't
> appear to be pruning $wnd[]. I'm not familiar with javascript and am
> wondering if this is a concern. To me it looks like we'd build up a
> huge array of functions. Should we be doing something like:
>
>    $wnd[callback] = null;
>         or
>    remove($wnd[callback]);
>
> after the handler is finished running? Won't this array grow forever?
> I think the author does say this is only a proof on concept and
> cleanup is out of scope for this article. Are there any reusable JSONP
> wrappers we can use with GWT?
>
> Thanks
>
> --
> 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]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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

Reply via email to