GWT and DefinitelyTyped

2016-01-26 Thread Martin Trummer
are there any plans/thoughts of using DefinitelyTyped with GWT - maybe in 
GWT 3.x?
http://definitelytyped.org/ 

i.e. it would be great to generate GWT js-interop code from the 
DefinitelyTyped type-script definitions.
then GWT would immediately have type-safe access to all the DefinitelyTyped 
supported libs 

is this technically possible at all?

-- 
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+unsubscr...@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.


Re: GWT and DefinitelyTyped

2016-01-26 Thread Jens
 

> are there any plans/thoughts of using DefinitelyTyped with GWT - maybe in 
> GWT 3.x?
> http://definitelytyped.org/ 
>
> i.e. it would be great to generate GWT js-interop code from the 
> DefinitelyTyped type-script definitions.
> then GWT would immediately have type-safe access to all the 
> DefinitelyTyped supported libs 
>
> is this technically possible at all?
>

I think I have read somewhere that Elemental 2.0 will be generated from 
TypeScript definitions which would hopefully mean that the Elemental 2.0 
generator works with any TypeScript definition file to produce JsInterop 
code. 

If I am wrong I am pretty sure someone will implement such a thing. I think 
the main challenge with any generator is that JsInterop 1.0 might miss some 
features that you need to workaround during the generation process.

-- J.

-- 
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+unsubscr...@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.


Re: GWT custom scrollIntoView() implementation

2016-01-26 Thread Thomas Broyer
The custom implementation was probably for Safari 3: 
https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#Browser_compatibility
It's no longer supported in GWT so we could switch to the native implementation 
nowadays.

-- 
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+unsubscr...@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.


Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-26 Thread thiago
Crux framework has an utility class that already implement this. You can 
check the class here: 
https://github.com/CruxFramework/crux/blob/master/crux-dev/src/main/java/org/cruxframework/crux/core/client/image/ImageProcessor.java
 


-- 
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+unsubscr...@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.


GWT custom scrollIntoView() implementation

2016-01-26 Thread Vassilis Virvilis
Hi,

I was using scrollIntoView() when I hit the bug.

In pages of mine GWT.scrollIntoView() is working in all major browsers.

In a foreign page GWTscrollIntoView() fails (does nothing) in chrome. It
however works in IE and firefox.

Looking at the implementation I found a custom implementation of
scrollIntoView.

I was expecting that GWT would call the native element.scrollIntoView().

I changed my code to call the native scrollIntoView() via JSNI and it works
in both pages in all browsers.

So does anybody know why GWT 2.7 has a custom scrollIntoView()
implementation?


-- 
Vassilis Virvilis

-- 
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+unsubscr...@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.


Re: GWT custom scrollIntoView() implementation

2016-01-26 Thread Juan Pablo Gardella
Hi Virviis,

Could you file a bug and the fix? It will be great to include in gwt 2.8.0

Thanks

On Tue, 26 Jan 2016 at 14:25 Vassilis Virvilis  wrote:

> Hi,
>
> I was using scrollIntoView() when I hit the bug.
>
> In pages of mine GWT.scrollIntoView() is working in all major browsers.
>
> In a foreign page GWTscrollIntoView() fails (does nothing) in chrome. It
> however works in IE and firefox.
>
> Looking at the implementation I found a custom implementation of
> scrollIntoView.
>
> I was expecting that GWT would call the native element.scrollIntoView().
>
> I changed my code to call the native scrollIntoView() via JSNI and it
> works in both pages in all browsers.
>
> So does anybody know why GWT 2.7 has a custom scrollIntoView()
> implementation?
>
>
> --
> Vassilis Virvilis
>
> --
> 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+unsubscr...@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.
>

-- 
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+unsubscr...@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.


Re: GWT custom scrollIntoView() implementation

2016-01-26 Thread Vassilis Virvilis
Hi Juan,

AFAIK GWT 2.8 will have jsinterop and elemental so the native
scrollIntoView() will be used automatically.

I don't have a problem to file a bug report in GWT but I thought I should
ask first here about the reasoning of the current status.

Submitting a patch looks considerably more scary but I can try if there is
a consensus that this is indeed a bug and not a desired behavior.


On Tue, Jan 26, 2016 at 10:45 PM, Juan Pablo Gardella <
gardellajuanpa...@gmail.com> wrote:

> Hi Virviis,
>
> Could you file a bug and the fix? It will be great to include in gwt 2.8.0
>
> Thanks
>
> On Tue, 26 Jan 2016 at 14:25 Vassilis Virvilis  wrote:
>
>> Hi,
>>
>> I was using scrollIntoView() when I hit the bug.
>>
>> In pages of mine GWT.scrollIntoView() is working in all major browsers.
>>
>> In a foreign page GWTscrollIntoView() fails (does nothing) in chrome. It
>> however works in IE and firefox.
>>
>> Looking at the implementation I found a custom implementation of
>> scrollIntoView.
>>
>> I was expecting that GWT would call the native element.scrollIntoView().
>>
>> I changed my code to call the native scrollIntoView() via JSNI and it
>> works in both pages in all browsers.
>>
>> So does anybody know why GWT 2.7 has a custom scrollIntoView()
>> implementation?
>>
>>
>> --
>> Vassilis Virvilis
>>
>> --
>> 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+unsubscr...@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.
>>
> --
> 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+unsubscr...@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.
>



-- 
Vassilis Virvilis

-- 
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+unsubscr...@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.


Re: Click even on outer HTMLPanel on existing html ?

2016-01-26 Thread Ed
Can somebody please give me some tips on how to solve this ?
How to get the click events on the outer div html, loaded in an HTMLPanel?
Thank you, Ed

On Tuesday, 12 January 2016 11:53:03 UTC+1, Ed wrote:
>
> Please some advice on this issue ?
>

-- 
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+unsubscr...@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.


Re: Click even on outer HTMLPanel on existing html ?

2016-01-26 Thread Vassilis Virvilis
stupid suggestion but do you sink the events you want to listen for?

On Tue, Jan 26, 2016 at 11:00 PM, Ed  wrote:

> Can somebody please give me some tips on how to solve this ?
> How to get the click events on the outer div html, loaded in an HTMLPanel?
> Thank you, Ed
>
>
> On Tuesday, 12 January 2016 11:53:03 UTC+1, Ed wrote:
>>
>> Please some advice on this issue ?
>>
> --
> 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+unsubscr...@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.
>



-- 
Vassilis Virvilis

-- 
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+unsubscr...@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.


Re: GWT custom scrollIntoView() implementation

2016-01-26 Thread Jens


> AFAIK GWT 2.8 will have jsinterop and elemental so the native 
> scrollIntoView() will be used automatically.
>

Only if you use Elemental of course ;)


I don't have a problem to file a bug report in GWT but I thought I should 
> ask first here about the reasoning of the current status.
>

Maybe the native scrollIntoView was not supported in all browsers back in 
the days in 2008 when that code was written. Or the behavior was flaky in 
most browsers. But its kind of strange if the current implementation does 
not work in Chrome and Google did not noticed it. GWT has a test case for 
it and I would assume that at least Google runs all tests in real browsers 
every now and then and not just in HtmlUnit (the test is disabled for 
HtmlUnit). So I think the issue should have been spotted. 

https://gwt.googlesource.com/gwt/+/master/user/test/com/google/gwt/dom/client/ElementTest.java#529

Have you tried other Chrome versions? Chrome tends to be super smart about 
avoiding browser reflows so maybe all the element information wasn't 
calculated yet correctly at the time scrollIntoView() was called and thus 
the implementation did not work. Have you tried wrapping scrollIntoView() 
with a deferred command just to see if it then starts to work?

Anyways if the test case continues to work when using the native method and 
the native method works equally well in browsers including IE8+ then I am 
pretty sure the custom implementation can be swapped with the native 
implementation nowadays. 

-- J.

-- 
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+unsubscr...@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.


Re: Click even on outer HTMLPanel on existing html ?

2016-01-26 Thread Ed Bras
Yes I do (as DomHandler: ClickEvent.getType()) that's why I don't
understand I don't catch any.
I get the idea the events aren't bubbled up (passed through), because the
loaded html in the HTMLPanel exists of existing html instead of creating it
through gwt, such that events are passed through...


On 26 January 2016 at 22:02, Vassilis Virvilis  wrote:

> stupid suggestion but do you sink the events you want to listen for?
>
> On Tue, Jan 26, 2016 at 11:00 PM, Ed  wrote:
>
>> Can somebody please give me some tips on how to solve this ?
>> How to get the click events on the outer div html, loaded in an HTMLPanel?
>> Thank you, Ed
>>
>>
>> On Tuesday, 12 January 2016 11:53:03 UTC+1, Ed wrote:
>>>
>>> Please some advice on this issue ?
>>>
>> --
>> 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+unsubscr...@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.
>>
>
>
>
> --
> Vassilis Virvilis
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/60RGI3WN1W0/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@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.
>

-- 
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+unsubscr...@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.


Re: Click even on outer HTMLPanel on existing html ?

2016-01-26 Thread Jens


> stupid suggestion but do you sink the events you want to listen for?
>

addDomHandler() automatically sinks the corresponding native event type. 
You only need to sink events yourself when you override onBrowserEvent() to 
handle native events without registering a handler using addDomHandler().

I know that HTMLPanel.addDomHandler(ClickHandler, ClickEvent.getType()) 
works as expected as our app uses it. However it does not use 
HTMLPanel.wrap().

-- J.

-- 
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+unsubscr...@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.


Re: Click even on outer HTMLPanel on existing html ?

2016-01-26 Thread Ed Bras
Hmmm,, so it should work for existing html, that is loaded from an xml file
(so no wrap is needed).


On 26 January 2016 at 23:31, Jens  wrote:

>
> stupid suggestion but do you sink the events you want to listen for?
>>
>
> addDomHandler() automatically sinks the corresponding native event type.
> You only need to sink events yourself when you override onBrowserEvent() to
> handle native events without registering a handler using addDomHandler().
>
> I know that HTMLPanel.addDomHandler(ClickHandler, ClickEvent.getType())
> works as expected as our app uses it. However it does not use
> HTMLPanel.wrap().
>
> -- J.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/60RGI3WN1W0/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@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.
>

-- 
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+unsubscr...@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.