Wednesday, March 16, 2016

Re: JsInterop: Set length of native JavaScript array?

Thanks Goktug, the patch is free of JSNI methods now :)

On Wednesday, March 16, 2016 at 11:19:20 AM UTC-4, Goktug Gokdogan wrote:
For your purposes in the patch; use internal utility ArrayHelper.setLength.

Normally following is just one way of doing it:

interface NativeArray {
  @JsProperty void setLength(int length);
}

((NativeArray) someArray).setLength(42);


On Mon, Mar 7, 2016 at 7:53 PM, Michael Zhou <zhoumoto...@gmail.com> wrote:
I'm trying to set the length of a native JavaScript array represented as an int[] in Java. Is it currently possible in JsInterop to do so?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment