It worked well - Thanks for your help so much ^^

But when we use addDomHandler, it return HandlerRegistration to call
removeHandler() method to remove handler:
Ex:

HandlerRegistration clickHandlerRegistration            =
addDomHandler(handler, ClickEvent.getType());
HandlerRegistration mouseDownHandlerRegistration =
addDomHandler(handler, MouseDownEvent.getType());
HandlerRegistration mouseMoveHandlerRegistration =
addDomHandler(handler, MouseMoveEvent.getType());

clickHandlerRegistration.removeHandler();
mouseDownHandlerRegistration.removeHandler();
mouseMoveHandlerRegistration.removeHandler();

So Each time we use addDomHandler, we must define a
HandlerRegistration for each handler ?


On Apr 13, 3:50 pm, Thomas Broyer <[email protected]> wrote:
> Generally, HandlerManager#fireEvent but for DomEvents (such as ClickEvent)
> you'll have to use 
> DomEvent.fireNativeEvent<http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/googl...,
> com.google.gwt.event.shared.HasHandlers)>.
>
> But well, actually, you shouldn't need this at all. If you use
> this.addDomHandler(handler, ClickEvent.getType()) to attach your handlers,
> the widget's default onBrowserEvent will handle the dispatch for you (and
> addDomHandler automatically calls sinkEvent for you). You shouldn't even
> need to use HandlerManager, it's an implementation detail of Widget. As the
> doc<http://code.google.com/webtoolkit/doc/latest/DevGuideUiCustomWidgets....>suggests,
>  have a look at the Button source code (actually, the code you're
> interested in is in 
> FocusWidget<http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/...>
> ).

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