That's something what interests me as well.
On 8 kvÄ›, 11:11, holgzn <holger.willebra...@gmail.com> wrote: > Hello everybody, > > i have a different question, but it's also related to the handling of > handlers. > > Recently, i read the article of Fred Sauer about best practices in > widget building. > (http://googlewebtoolkit.blogspot.com/2009/05/widget-best-practices- > widget-building.html) > At the end of the article ('clean up after yourself'), he says the > registration of DOM event listeners should occur in the onLoad method > and not in the constructor when extending Widget directly.The onUnload > method should remove the registration. As he is referring to CheckBox > as Example, this relates to DOM.setEventListener. > > Now here's my question: > - Should I do the same when extending Composite and when I'm only > using addDomHandler() ? For example, if i have a composite that uses > some handlers (i.e. MouseIn / MouseOut). Should i setup the handlers > in onLoad and keep a reference to the HandlerRegistrations and remove > them in onUnload ? > > Thanks, > > Holger --~--~---------~--~----~------------~-------~--~----~ 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-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---