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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
