Looks like you're using a pre-2.5.1
version: https://code.google.com/p/google-web-toolkit/issues/detail?id=7552
On Wednesday, February 12, 2014 3:30:14 AM UTC+1, Tom wrote:
>
> ok, I have a button & when clicking that button it will call this methodX
>
> public void methodX(){
> CheckBox cb=new CheckBox();
> HandlerRegistration reg=cb.addClickHandler(new ClickHandler(){
>
> @Override
> public void onClick(ClickEvent event) {
> // TODO Auto-generated method stub
> int x=1;
> }
>
> });
> if(reg!=null){
> reg.removeHandler();
> }
> }
>
> The above methoxX runs ok. There no error whatsoever when i click the
> button 1 time or many times. However if I change the methodX a bit
>
> public void methodX(){
> CheckBox cb=new CheckBox();
> HandlerRegistration reg=cb.addClickHandler(new ClickHandler(){
>
> @Override
> public void onClick(ClickEvent event) {
> // TODO Auto-generated method stub
> int x=1;
> }
>
> });
> if(reg!=null){
> reg.removeHandler();
> }
>
> ///add these lines of code
> if(reg!=null){
> reg.removeHandler();
> }
> }
>
> Now when clicking the button I got this error
>
> Uncaught exception escaped
> com.google.gwt.event.shared.UmbrellaException: Exception caught: redundant
> remove call
> at
> com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
>
> Is there anyway to control this or this is Google bug?
>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.