java - Disabling of all GWT child widgets works strange -


i need disable childs widgets of custom panel. have such method this:

    public static void disablechilds(widget widget) {          if(widget instanceof haswidgets) {               iterator<widget> iter = ((haswidgets) widget).iterator();               while(iter.hasnext()) {                   widget element = iter.next();                   //window.alert(element.getclass().tostring());                   if(element instanceof hasenabled) {                       ((hasenabled) element).setenabled(false);                   }                   disablechilds(element);               }          }     } 

the problem code works on firefox(24.5.0) , if

      window.alert(element.getclass().tostring()); 

is uncommented. not want work on chrome(35.0.1916.114) @ all.

i grateful help.


Comments