PDA

View Full Version : [CLOSED] Tooltip Bug



JackyChan
13 May 2011, 1:26 AM
Hi there,

First sorry for my poor english. I found a bug with the tooltip function, if i set a button's tooltip more than once before the button rendered, it raise the exception.

Example code as following:

import com.google.gwt.core.client.EntryPoint;
import com.ext.gxt.ui.client.widget.button.Button;

public class MyApp implements EntryPoint {
public void onModuleLoad() {
Button button = new Button();
button.setText("click me");
button.setToolTip("tooltip init");
button.setToolTip("tooltip update"); // raise java.lang.NullPointerException
}
}

sven
13 May 2011, 1:54 AM
I just run that code against GXT 2.2.4 and it works without any problems. Which GXT version are you using? What is the strack trace?

JackyChan
13 May 2011, 6:21 PM
sven , thanks your reply, the stack trace as follows:

10:10:34.695 [ERROR] [myapp] Unable to load module entry point class com.myapp.backend.client.MyApp (see associated exception for details)

java.lang.NullPointerException: null
at com.extjs.gxt.ui.client.widget.ContentPanel.getElement(ContentPanel.java:332)
at com.extjs.gxt.ui.client.widget.tips.Tip.doAutoWidth(Tip.java:148)
at com.extjs.gxt.ui.client.widget.tips.ToolTip.update(ToolTip.java:245)
at com.extjs.gxt.ui.client.widget.Component.setToolTip(Component.java:1367)
at com.extjs.gxt.ui.client.widget.Component.setToolTip(Component.java:1353)
at com.myapp.backend.client.MyApp.onModuleLoad(MyApp.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:193)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:680)

my development enviroment is GWT 2.3 , GXT 2.2.3-gwt22

becevka
14 May 2011, 2:08 AM
I can approve, that bug is also reproducible for me under the same environment GWT 2.3 GXT 2.2.3

sven
14 May 2011, 2:28 AM
I was using GXT 2.2.4 and its fixed there for me