On Sun, Feb 15, 2009 at 8:09 PM, Eric Ayers <[email protected]> wrote:
> Hi Denis,
>
> Unfortunately, a JavaScript Map does not equal a Java Map object.  You
> can look at the GWT 1.5 source in some of the wrapper helper classes
> such as com.google.gwt.core.client.JsArray, JsArrayString, ... for
> some models on how to wrap a primitive Java type.

I meant to say a complex type...

>
> -Eric.
>
> On Sun, Feb 15, 2009 at 7:38 PM, denis56 <[email protected]> wrote:
>>
>> Hello everyone,
>>
>> I am struggling with return types in methods implementing native
>> javascript interfaces. Returning strings is no problem, but calling a
>> method that returns a map
>>
>>        public native Map<Long, GwtStock> getMap() /*-{
>>                return $wnd.parent.__getMap();
>>        }-*/;
>>
>> works only in hosted mode (!) and either throws a classcast exception
>> or returns null.
>>
>> Could anyone shed light on that issue. I remember reading a note
>> somewhere that jsni methods cannot return complex types but did not
>> really get the way around and alerted by absolutely intended behavior
>> in hosted mode.
>>
>> Thanks
>>
>> >>
>>
>
>
>
> --
> Eric Z. Ayers - GWT Team - Atlanta, GA USA
> http://code.google.com/webtoolkit/
>



-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

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