Problem with popuppanel

13 views
Skip to first unread message

sony

unread,
Feb 6, 2010, 5:05:41 PM2/6/10
to Google Web Toolkit

Hi,

I am using PopupPanel and Gwt Canvas for my project. Here when clicked
on the canvas-drawing area the popuppanel appears. In my main class i
have a private class which extends PopupPanel and this panel is then
called in the onModuleLoad(). The code looks something like this:

Button b = new Button("Circle");
b.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent event) {
DrawingArea d = new DrawingArea(40, 30);
Circle c = new Circle(20, 15, 20);
d.add(c);
dragController.makeDraggable(d);
dragController.setBehaviorDragStartSensitivity(1);
boundaryPanel.add(d, 200, 200 );
//Diagram dia = new Diagram(boundaryPanel);
/* Shape s = new Shape(d);
s.showOnDiagram(diagram);*/
d.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent event) {
System.out.println("ERD Circle");
Widget w = (Widget)event.getSource();
PopUpPanel pop = new PopUpPanel(w);
pop.setPopupPosition(w.getAbsoluteLeft() -
150, w.getAbsoluteTop());
pop.show();
}
});
}
});

Here PopUpPanel is the one that extends PopupPanel. Here the code for
PopUpPanel:

private static class PopUpPanel extends PopupPanel{

Button connect = new Button("Connect");
Button delete = new Button("Delete");
Button detail = new Button("Detail");

public PopUpPanel(final Widget widget){
super(true);
VerticalPanel vp = new VerticalPanel();
vp.add(connect);
vp.add(delete);
vp.add(detail);

setWidget(vp);
}
}

Now the problem i am facing is:

When i click on the canvas-drawing area PopupPanel appears together
with an error. Here are the error details:

[ERROR] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (Error): Invalid class
string


number: -2147221005
description: Invalid class string


at com.google.gwt.user.client.ui.impl.PopupImplIE6.onShow(Native
Method)
at com.google.gwt.user.client.ui.PopupPanel
$ResizeAnimation.onInstantaneousRun(PopupPanel.java:257)
at com.google.gwt.user.client.ui.PopupPanel
$ResizeAnimation.setState(PopupPanel.java:180)
at
com.google.gwt.user.client.ui.PopupPanel.setState(PopupPanel.java:
1189)
at com.google.gwt.user.client.ui.PopupPanel.show(PopupPanel.java:
794)
at com.e.r.d.client.ERD1$4$1.onClick(ERD1.java:177)
at
com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:
54)
at
com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.HandlerManager
$HandlerRegistry.fireEvent(HandlerManager.java:65)
at com.google.gwt.event.shared.HandlerManager
$HandlerRegistry.access$1(HandlerManager.java:53)
at
com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:
178)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:52)
at
com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:
116)
at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:
90)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1320)
at com.google.gwt.user.client.DOM.dispatchEventAndCatch(DOM.java:
1299)
at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1262)

Any input would be of great help.

Thank you.

SUHASINI PRASAD

unread,
Feb 6, 2010, 11:14:19 PM2/6/10
to Google Web Toolkit
I got it working. It was due to missing microsoft JScript registration. once i registered "regsvr32 jscript.dll" it is working fine.


--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Reply all
Reply to author
Forward
0 new messages