2009/6/12 Thomas Broyer <[email protected]> > > > 1- What is missing here is when would the Client UI typically > > subscribe/unsubscribe from the event bus. If this were a desktop > > application I would simply use weak reference so I would not have to > > unsubscribe my UI manually to prevent a memory leak. > > As with any event, I'd subscribe in the onLoad and unsubscribe in the > onUnload (would be even better if there was a destructor, so that even > when not attached to the DOM, your widget could receive events and > enter a "dirty" state, so that when it is attached again to the DOM it > knows if it has to refresh or not) >
I didn't understand that bit. The presenter needs to subscribe but is just a class and doesn't have an onUnload method. Even if you make it a widget, having subscribed, since the eventbus has a reference to it, you won't get an unload. Or am I missing something obvious here. Ian http://examples.roughian.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
