Tuesday, October 30, 2012

Re: Destroy a widget



If you want to "destroy" h1, and have it stop reacting to events, simply remove it from the dom and ensure it is garbage collected (ie. set your reference to null):

panel.remove(h1);
h1 = null;

Thanks

Garbage collected? I thought that we were in a Javascript world
Setting to null doesn't work like I want because it's Javascript code.

And I don't want to remove it from a panel , but "destroy it" as entity. Maybe that doesn't have any sense, because I don't know how is implemented by GWT compiler into Javascript code, but  h1=null doesn`t work for me



--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/OrUpgQgS5hAJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment