On Friday, November 5, 2010, Bart van den Eijnden <[email protected]> wrote:
> Hi list,
>
> this discussion came up in ticket 369.
>
> Currently we use the private functions beforeDestroy and onDestroy quite a 
> bit in GeoExt.
>
> Shouldn't we be using the public events beforedestroy and destroy instead?

IIRC we decided against relying on events inside our components in the
early stages of GeoExt development. I can't remember the exact
reasons, but I think it made sense to build components just as Ext
does, using onRender, afterRender, etc. Also, we want to avoid
situations where code of our components aren't executed because some
application code has stopped the callback execution chain (by
returning false).

Now to answer fredj's question - onDestroy vs afterDestroy - I'd say
it  depends. It depends whether you want to be called "on" destroy or
"after" destroy :-) I'd say use onDestroy when you can, afterDestroy
when onDestroy is too early for what you need to do.

Just my 2 cents,

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Dev mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/dev

Reply via email to