Hi and thanks for answering.

I also tend to believe this is not a bug - but - it is definitely in my
wish list.

@Colin jsinterop is certainly kind of fragile but if you bang your head
against it at the end you start understanding the errors. In most cases you
can fix the error by making the java code or the jsinterop declaration
__better__. This is a case that I had to uglify my bindings. So I don't
believe that is fails in new, unique and interesting ways. It is rather
consistent. It may be somewhat fragile and cryptic but it is consistent and
I don't believe that you will have a problem with element[] (assuming
element is a jsinterop native, and com.google.dom.dontremember.element),
double[] or boolean[]. But you will be in world of hurt if you try to
communicate Double[], Boolean[], String[].

@Roberto
Please note that I am not mixing stuff (java and js objects in the same
array, or different kind of objects in the same array).

D3 is doing the correct thing here. If you pass an array of something,
let's say T[] you can expect that you will be getting T and T[] out of D3
functions (can't really remember the specifics). What I am passing are pure
js objects modeled with jsinterop, and they still count as js, not java. So
I am expecting to get back what I feed in / declared at the start.

That part works.

I am putting Date[] --> I am getting back Date[] . Correct
I am putting double[] --> I am getting back double[] . Correct
I am putting Double[] --> I am getting back exception. Not so nice.

That basically means that I can't have a generic function that will work
with all kind of GenericTypes because double is not an object in java. That
means I have to special case the interface like this

      V get(T t); --> works great for JsObects as it should
      double getDouble(T t) --> ugly huh?

So what do I want: Double[] to be castable to double[] in the GWT js
context (not in the java context). I don't know if this is possible but it
is definitely desirable. (The same for String[] and Boolean[]) and a pony
of course :-)

Thanks again.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAKbOjExku8sLUm3Ky7B6OF-gx%3DvgvdP_v8nd-Pi0WNeqzyv06g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to