extending mailnews objects

Ben Bucksch ben.bucksch at beonex.com
Tue Jun 8 09:37:43 UTC 2010


  On 08.06.2010 01:06, Kent James wrote:
> Rather than using inheritance, I see that a lot of mozilla code 
> forwards properties to objects loaded through XPCOM using NS_FORWARD 
> macros.
> My question is this: Is there any strong reason to prefer one over the 
> other?

This is a design decision. This forwarding is the "design pattern" 
called "Delegation".
<http://en.wikipedia.org/wiki/Delegation_%28programming%29>

> I'm not sure how this affects people trying to do this through js. It 
> seems like it would help them even more

Interesting idea.

Ben



More information about the tb-planning mailing list