On 26 avr, 04:53, Blessed Geek <[email protected]> wrote:
> I am wondering why GWT team has overlooked the need for
> - get (String key) method

This is a JS Object method, not directly related to arrays (and it's
bad practice to store key/value pairs in an Array, you should use an
Object instead; though, eventualy, if what yo get is a String
representing a number, there's no real reason to parseInt() and then
use get(int)...)

> - toArray() method

This has been discussed a few times here already.

> Therefore, I had to extend JsArray

Have a look at JsCollections' JsArrays:
http://code.google.com/p/gwt-in-the-air/source/browse/trunk/src/net/ltgt/gwt/jscollections/client/JsArrays.java

Note that the toArray/fromArray methods won't do a copy in web mode,
so they're primarily for iteration (for (String item : JsArrays.toArray
(aJsArrayString)) { ... }) or for some specific cases with JSNI (e.g.
a method with a String[] argument, passed to a native JS method as an
Array of String)


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