Brilliant!

Thank you Thomas

On Saturday, April 29, 2017 at 4:22:21 PM UTC+1, Thomas Broyer wrote:
>
>
> On Saturday, April 29, 2017 at 5:07:04 PM UTC+2, [email protected] wrote:
>>
>> Hello,
>>
>> I am starting to learn gwt elemental. 
>> I've started with the code here: 
>> https://gist.github.com/branflake2267/8e4b9d4f2dc594fe21a125155516ec97 
>> <https://www.google.com/url?q=https%3A%2F%2Fgist.github.com%2Fbranflake2267%2F8e4b9d4f2dc594fe21a125155516ec97&sa=D&sntz=1&usg=AFQjCNG-XPGg63KdhAJ77ehfcZ5NoVdQ4Q>
>>
>> but there are some compile time errors. See attached screenshot with 
>> comments on the lines with errors, and my crude attempts at workarounds.
>>
>> The workarounds seem to fix the compile time errors, but when running the 
>> app there is a runtime exception at this line of code:
>>
>> HTMLDocument document =  new HTMLDocument(); //Error-   Illegal 
>> constructor.
>>
>
> The Gist was apparently using 
> com.google.gwt:element2-experimental:16-06-30, and you're using 
> com.google.elemental2:elemental2-*:1.0.0-beta-1, so it's expected that 
> changes are needed.
>
> So, first, you need to use elemental2.dom.DomGlobal instead of 
> elemental2.core.Global.
> Then, instead of double-casting to MarginUnionType, you can use 
> MarginUnionType.of("10px").
> Same for FillStyleUnionType and StrokeStyleUnionType.
> BTW, instead of double-casts (e.g. for CanvasRenderingContext2D), you can 
> use jsinterop.base.Js.cast().
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to