On 12/01/2011 05:02 PM, Remy Blank wrote:
osimons wrote:
...
There's actually nothing wrong with using inheritance with components,
except for two things:

  - Only one component in a "branch" of inheritance should be enabled
(i.e. you should never enable both parent and child).

Why is that? My plan was to have one of the classes selected with an ExtensionOption. Doesn't that require them all to be active? Can't I do that? (Or am I confusing Interface with Component?)

  - Calling the base class constructor is awkward. I'm not even sure what
the correct way to do that would be.
...
That's one possibility, yes. Another one would be to provide a clean way
to call the parent constructor. I was suggesting calling it
automatically, but we could also have a super_init() function that calls
the parent's constructor correctly (and bypasses the registration of the
instance under the parent's class).

super_init() would work for me.

...
"Try to avoid subclassing components" is the best advice,
really... :-)

Heh, not convinced here :)

Here, either.

                                                 Chris
--
Christopher Nelson, Software Engineering Manager
SIXNET - Solutions for Your Industrial Networking Challenges
331 Ushers Road, Ballston Lake, NY  12019
Tel: +1.518.877.5173, Fax: +1.518.877.8346 www.sixnet.com

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" 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/trac-users?hl=en.

Reply via email to