wanggwt
3 Jun 2008, 3:29 AM
Hi guys.
I'm new with ext-gwt, and I'm trying to add a timepedia chartPanel to ext-gwt panel, but it was failed. Tracing the code I get:
Ext-Gwt Container class has:
private native void setParent(Widget parent, Widget child) /*-{
child.@com.google.gwt.user.client.ui.Widget::parent = parent;
}-*/;
Standart Gwt Panel has:
void setParent(Widget parent) {
Widget oldParent = this.parent;
if (parent == null) {
if (oldParent != null && oldParent.isAttached()) {
onDetach();
assert !isAttached() : "Failure of " + this.getClass().getName()
+ " to call super.onDetach()";
}
this.parent = null;
} else {
if (oldParent != null) {
throw new IllegalStateException(
"Cannot set a new parent without first clearing the old parent");
}
this.parent = parent;
if (parent.isAttached()) {
onAttach(); ////////// This is important ******************
assert isAttached() : "Failure of " + this.getClass().getName()
+ " to call super.onAttach()";
}
}
}
Should ext-gwt forward the events like the standard gwt-panel? Otherwise compatibility becomes a big issue.
Thanks
I'm new with ext-gwt, and I'm trying to add a timepedia chartPanel to ext-gwt panel, but it was failed. Tracing the code I get:
Ext-Gwt Container class has:
private native void setParent(Widget parent, Widget child) /*-{
child.@com.google.gwt.user.client.ui.Widget::parent = parent;
}-*/;
Standart Gwt Panel has:
void setParent(Widget parent) {
Widget oldParent = this.parent;
if (parent == null) {
if (oldParent != null && oldParent.isAttached()) {
onDetach();
assert !isAttached() : "Failure of " + this.getClass().getName()
+ " to call super.onDetach()";
}
this.parent = null;
} else {
if (oldParent != null) {
throw new IllegalStateException(
"Cannot set a new parent without first clearing the old parent");
}
this.parent = parent;
if (parent.isAttached()) {
onAttach(); ////////// This is important ******************
assert isAttached() : "Failure of " + this.getClass().getName()
+ " to call super.onAttach()";
}
}
}
Should ext-gwt forward the events like the standard gwt-panel? Otherwise compatibility becomes a big issue.
Thanks