Re: elemental2: Native maps with primitive types?

2019-08-16 Thread Vassilis Virvilis
thanks that worked too. It is Js.asAny(@DonotAutobox Object o) which performs an unchecked cast below. Thanks for tips. On Thu, Aug 15, 2019 at 9:53 AM Peter Donald wrote: > > > > On Thu, Aug 15, 2019 at 4:28 PM Vassilis Virvilis wrote: >> >> I have seen the @DoNotAutoBox and I tried with

Re: elemental2: Native maps with primitive types?

2019-08-15 Thread Peter Donald
On Thu, Aug 15, 2019 at 4:28 PM Vassilis Virvilis wrote: > I have seen the @DoNotAutoBox and I tried with Integer, Number, JsNumber. > > Note: I can put int in the JsPropertyMap but I cannot read it back. So > I cast it to (double) and the then to (int). I believe that is because > JavaScript

Re: elemental2: Native maps with primitive types?

2019-08-15 Thread Vassilis Virvilis
yep that worked. thanks a bunch. I have seen the @DoNotAutoBox and I tried with Integer, Number, JsNumber. Note: I can put int in the JsPropertyMap but I cannot read it back. So I cast it to (double) and the then to (int). I believe that is because JavaScript does not have int type. thanks

Re: elemental2: Native maps with primitive types?

2019-08-14 Thread Jens
JsPropertyMap.set(key, value) is marked with @DoNotAutoBox, so I guess you should be able to use JsPropertyMap and set int, float, double into it without them being auto boxed. -- J. -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To