Hi,

JavaScript's scoping is a little bit strange for us Java programmers
once again:

A function has its own scope, so "this" refers to the function,
instead of your PagePanel.

The JavaScript pattern is to add a
var that = this;
before the function declaration, and then use "that" instead of
"this".

Chris


On Mar 3, 10:41 am, aquinault <[email protected]> wrote:
> Hi,
>
> I would like to set the HTMLPanel element's to a CSS class to position
> the element at the destination position.
>
> When the transition ends (using the transitionend event), disable
> animations by removing the CSS class that enables animations and
> replace it with the CSS class to disable animations.
>
> But my onTransitionEnd() is never called !!!
>
> Do you have any idea please?
>
> public class PagePanel extends HTMLPanel {
> ...
>
>         public native void registerTransitionEndEvent(Element element) /*-{
>                 try {
>                         var callBack = function(e){
>                                 
> [email protected]::onTransitionEnd()();
>                         };
>                         element.addEventListener('webkitTransitionEnd', 
> callBack, false);
>                 }
>                 catch (err) {
>                 }
>         }-*/;
>
>         public void onTransitionEnd() {
>                 Window.alert("done");
>         }
>
>
>
> }

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