On Thu, Jun 18, 2009 at 3:56 PM, Ian Bambury<[email protected]> wrote:
> 2009/6/18 Thomas Broyer <[email protected]>
>> This I don't understand, onUnload is called by the parent widget
>> (through onDetach) when you remove its child (and it thus is detached
>> from the DOM). Whether the eventbus has a reference to the widget is
>> orthogonal.
>
> I didn't realise that widgets were bird-watchers! :-)

Do you mean ornithologists?

Anyway, I think Thomas is talking about the presenter either being a
widget or wrapping a widget.  Widgets are notified when their elements
are removed from the DOM, so you could conceivable make the presenter
aware of the DOM detachment and use that as a convenient time to "get
off the bus".  As someone mentioned, though, if the widget is detached
from the DOM but still "alive" then it might get reattached at some
future time.  If there was a real destructor then detached widgets
could continue to track state until destruction so they'd be up to
date when reattached.  Of course, if wishes were horses....

Ian

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to