Re: [gwt-contrib] Re: Elemental2 and JsInterop base beta releases available.

2017-05-09 Thread Ignacio Baca Moreno-Torres
Question about OscilatorNode (https://github.com/google/closure-compiler/blob/c77ca197a1f6674e4c267a29a3643a86b61cf51d/externs/browser/w3c_audio.js) This start method is translated as a "StartCallbackFunction start", should it not be translated as a method directly? This callback field cannot be

Re: [gwt-contrib] Re: JsInterop & collections

2017-05-09 Thread 'Ray Cromwell' via GWT Contributors
I think it would be better to use a JsArrayListAdapter in order to prevent making copies all over the place, and also making mutations write-through on both sides e.g. public class JsArrayListAdapter extends AbstractList { public JsArrayListAdapter(ArrayLike blah) { this.array = blah; }

Re: [gwt-contrib] Minor thing with Elemental 2 DomGlobal.requestAnimationFrame

2017-05-09 Thread 'Goktug Gokdogan' via GWT Contributors
We will soon have a github repro but right now this is the right place to report it. It looks like closure definition is missing return definition: https://github.com/google/closure-compiler/blob/master/externs/browser/w3c_anim_timing.js#L26 Updating that should resolve the issue. Could you file

Re: [gwt-contrib] Re: JsInterop & collections

2017-05-09 Thread 'Goktug Gokdogan' via GWT Contributors
Yes, theoretically you should be able to use the second parameter on Json.parse Json.stringify for conversion back and forth between java collections and js primitives. In this model, your javascript code needs to use Java collection APIs. > java.util.Arrays.asList() should be enough keep in mind

Re: [gwt-contrib] Re: Elemental2 and JsInterop base beta releases available.

2017-05-09 Thread 'Goktug Gokdogan' via GWT Contributors
BTW, if you are using elemental2, keep in mind that these are beta releases to get feedback and APIs will keep changing until we finalize it. So be prepared for breakages in releases until we do the final release cut. On Tue, May 9, 2017 at 2:32 PM, Julien Dramaix wrote: > I forgot to mention: a

Re: [gwt-contrib] Re: Elemental2 and JsInterop base beta releases available.

2017-05-09 Thread Julien Dramaix
I forgot to mention: as a workaround, you can create your own JsFunction callback and cast it to Function: @JsFunction interface MyJsFunction { void onInvoke(); default Function asFunction() { return (Function) this; } } On Tue, May 9, 2017 at 9:37 AM Julien Dramaix wrote: > > I b

Re: [gwt-contrib] Re: Elemental2 and JsInterop base beta releases available.

2017-05-09 Thread Julien Dramaix
> I believe it's due to how they're declared in the Closure externs: onreadystatechange and onerror: https://github.com/google/closure-compiler/blob/8ac08c03cd695b84f8a79ac3a1338172df3f/externs/browser/w3c_xml.js#L393-L403 vs all the other callbacks: https://github.com/google/closure-compiler/b

Re: [gwt-contrib] Re: JsInterop & collections

2017-05-09 Thread Thomas Broyer
On Tuesday, May 9, 2017 at 4:34:48 PM UTC+2, Marcin Okraszewski wrote: > > There is indeed something in it. Actually you could have some type of > naming convention, like in TJSON ( > https://tonyarcieri.com/introducing-tjson-a-stricter-typed-form-of-json) > or TypedJson (https://www.npmjs.com/

Re: [gwt-contrib] Re: JsInterop & collections

2017-05-09 Thread Marcin Okraszewski
There is indeed something in it. Actually you could have some type of naming convention, like in TJSON (https://tonyarcieri.com/introducing-tjson-a-stricter-typed-form-of-json) or TypedJson (https://www.npmjs.com/package/typed-json) to figure out proper types. But then I would need to create eg

Re: [gwt-contrib] Re: Elemental2 and JsInterop base beta releases available.

2017-05-09 Thread Thomas Broyer
On Tuesday, May 9, 2017 at 2:02:40 PM UTC+2, Daniel Harezlak wrote: > > > > On Tuesday, May 9, 2017 at 1:03:41 PM UTC+2, Thomas Broyer wrote: >> >> >> >> On Tuesday, May 9, 2017 at 1:03:00 PM UTC+2, Daniel Harezlak wrote: >>> >>> HI, what are the replacements for elemental2.Global.window and simi

Re: [gwt-contrib] Re: Elemental2 and JsInterop base beta releases available.

2017-05-09 Thread Daniel Harezlak
On Tuesday, May 9, 2017 at 1:03:41 PM UTC+2, Thomas Broyer wrote: > > > > On Tuesday, May 9, 2017 at 1:03:00 PM UTC+2, Daniel Harezlak wrote: >> >> HI, what are the replacements for elemental2.Global.window and similar >> in this new release? >> > > elemental2.DomGlobal.window (in elemental2-dom

Re: [gwt-contrib] Re: JsInterop & collections

2017-05-09 Thread Thomas Broyer
On Tuesday, May 9, 2017 at 12:08:12 PM UTC+2, Marcin Okraszewski wrote: > > In short I would like JS arrays to be visible in GWT as a List and objects > parsed from JSON also as a Map. > > Maybe I'll try one more time to explain what we have. We share model > between server and GWT in form of j

Re: [gwt-contrib] Re: JsInterop & collections

2017-05-09 Thread Jens
> I believe it was in plans with @JsConvert – see slides 67 – 69. > https://docs.google.com/file/d/0ByS1wxINeBWjeGYxbkJpamxFZ28/edit > I think this is more meant to be used with non-native JsTypes. When you have a JsType implemented in Java and some JavaScript gives you JS through the Java ob

Re: [gwt-contrib] Re: Elemental2 and JsInterop base beta releases available.

2017-05-09 Thread Thomas Broyer
On Tuesday, May 9, 2017 at 1:03:00 PM UTC+2, Daniel Harezlak wrote: > > HI, what are the replacements for elemental2.Global.window and similar in > this new release? > elemental2.DomGlobal.window (in elemental2-dom dependency) -- You received this message because you are subscribed to the Go

Re: [gwt-contrib] Re: Elemental2 and JsInterop base beta releases available.

2017-05-09 Thread Daniel Harezlak
HI, what are the replacements for elemental2.Global.window and similar in this new release? -- 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 google-web-toolk

Re: [gwt-contrib] Re: JsInterop & collections

2017-05-09 Thread Marcin Okraszewski
In short I would like JS arrays to be visible in GWT as a List and objects parsed from JSON also as a Map. Maybe I'll try one more time to explain what we have. We share model between server and GWT in form of java interfaces. Those interfaces are declared as return types of Jersey services, which

[gwt-contrib] Minor thing with Elemental 2 DomGlobal.requestAnimationFrame

2017-05-09 Thread Anders Forsell
Hi, I found a small annoyance with DomGlobal.requestAnimationFrame in that you have to supply a function which returns an Object. DomGlobal.requestAnimationFrame(event -> { myPresenter.loadContent(); return null; }); I'd like to be able to pass a void method, where s