PDA

View Full Version : 1.0.2] ToolTipConfig.setHideDelay(0) throws exception



Mist
8 Aug 2008, 1:21 AM
Docs of setHideDelay() says: "Set to 0 for the tooltip to hide immediately".
But this code:


ToolTipConfig tipConfig =new ToolTipConfig("tip");
tipConfig.setHideDelay(0);
setToolTip(tipConfig);produces:

java.lang.IllegalArgumentException: must be positive
at com.google.gwt.user.client.Timer.schedule(Timer.java:112)

The bug is in ToolTip class (line 335) when hideDelay ==0 timer should not be created
is :


if (autoHide) {
delayHide();
}

should be somethinf like this:


if (autoHide) {
if(getHideDelay()>0){
delayHide();
}else {
hide();
}
}