When I override the method SimplePanel.clear() to remove all elements of 
the contained element in SimplePanel, and then add a widget 
throug setWidget() I receive the error (see the complete error below:
---
this.appendChild is not a function"?
----

I remove all element after SimplePanel performs a clear itself such that it 
removed the contained widget, something like (subclass of SimplePanel:
----
public final void clear() {
super.clear();
UtilsWidget.removeAllChilds(getElement()); 
}
}
---
I remove all child elements by iterating through all children (in reversed 
order) and removing them when the child is of type Element.
When I not remove all children, all is fine, but then the added extra 
elements aren't removed :(


Why is this? 
I perform this step as I also add "lightweight" text elements to the 
SimplePanel that I also want to be removed.



The exact exception (using gwt 2.5.0):
-----
com.google.gwt.core.client.JavaScriptException: (TypeError) 
@com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript
 
object(2812), JavaScript object(1793), JavaScript object(2822)]): 
this.appendChild is not a function
com.bv.gwt.common.exception.ExceptionHandlerDefault - - Handling an 
exception. Exception: com.google.gwt.core.client.JavaScriptException: 
(TypeError) 
@com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript
 
object(2812), JavaScript object(1793), JavaScript object(2822)]): 
this.appendChild is not a function
at 
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
at 
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
at 
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
at 
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at 
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at 
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at 
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at 
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:662)


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to