On Sat, Apr 10, 2010 at 7:37 PM, Sanjiv Jivan <[email protected]>wrote:

>   private static native Object apply(Object jsFunction, Object thisObj,
>       Object arguments) /*-{
>     if (@com.google.gwt.core.client.GWT::isScript()()) {
>       return jsFunction.apply(thisObj, arguments);
>     } else {
>       _ = jsFunction.apply(thisObj, arguments);
>       if (_ != null) {
>         // Wrap for hosted mode
>         _ = Object(_);
>       }
>       return _;
>     }
>   }-*/;
>
> What is the rationale for this wrapping as Object(..) in hosted mode? And
> can you suggest a workaround for this usecase?
>

Notice the return type -- you can't return a JS primitive as an Object, but
a JavaScriptObject can be returned as an Object.

I have cc'd BobV who wrote this -- perhaps he can suggest a workaround.

-- 
John A. Tamplin
Software Engineer (GWT), Google

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

To unsubscribe, reply using "remove me" as the subject.

Reply via email to