First off, you might want to think about reusing widgets before 
destroying them. If you could use the same widget again, set its 
visibility to hidden and reuse it when the time comes.

Concerning your question you might want to deploy a custom event the 
widget can fire before destroying itself, so other widgets (like the 
window) can react on it.

But it would probably be a much cleaner design (MVC-wise), if you let 
the widget just fire an "I'm done" event, and keep instance management 
(deletion) where it belongs, ie. in the code that created the widget in 
the first place.

T.


On 07/24/2012 03:13 PM, totty wrote:
> What event if any is dispatched when a widget is destroyed? How might I know
> when it's destroyed?
>
> I have a widget that when is not more required should be destroying itself
> (parent's doesnt know about it).
> But when is into a window I would like the window to be notified of the
> destroying of the content and to close (the window) itself too.
>
> thanks
>
>
>
> --
> View this message in context: 
> http://qooxdoo.678.n2.nabble.com/What-event-if-any-is-dispatched-when-a-widget-is-destroyed-How-might-I-know-when-it-s-destroyed-tp7580745.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to