FocusWidget fired repeats the event

2011-02-10 Thread julio
Hi,

I'm using GWT 2.1.1 and I created a widget that extends FocusWidget. I
have added to this widget a classical ClickHandler like this:

new ClickHandler() {
public void onClick(ClickEvent event) {
//do something
}
};

my problem is when the widget is fired the event is triggered many
times instead of only one.

Is there a way to "stop" this accumulation of events?

I tested this only on Firefox 3.6.13

Thanks,
Julio

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: FocusWidget fired repeats the event

2011-02-10 Thread Lazo Apostolovski
How many times you add new ClickHandler?

I think that you add more then one different handlers, who listening for 
click event. TextBox.addClickHandler(new ClickHandler(){}). Maybe when page 
reload or something.

Try to debug how many different instances you are creating and adding.


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: FocusWidget fired repeats the event

2011-02-10 Thread julio
Hi,

click-handler is added only one time (verified debugging too).

Julio

On Feb 10, 1:52 pm, Lazo Apostolovski 
wrote:
> How many times you add new ClickHandler?
>
> I think that you add more then one different handlers, who listening for
> click event. TextBox.addClickHandler(new ClickHandler(){}). Maybe when page
> reload or something.
>
> Try to debug how many different instances you are creating and adding.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.