[dba-VB] Inheritance and derived methods

Stuart McLachlan stuart at lexacorp.com.pg
Mon Oct 17 17:12:38 CDT 2011


Multiple interfaces with a single class rather than inheritance.  

Inheritance is great, but like classes in Access, it's not the solution to every problem.   :-)

-- 
Stuart


On 17 Oct 2011 at 12:53, jwcolby wrote:

> I have three supervisor classes.  A ton of the code in each supervisor
> is common so I am refactoring the code to use inheritance.  All that
> is cool until...
> 
> I have a thread that each supervisor has.  It is mtStart which starts
> a thread and that thread calls mStart.  mtStart is literally identical
> in all three supervisors but mStart is not, each supervisor does a
> different job.
> 
> So I am saying we have the thread itself in the base class and the
> mtStart in the base class but mStart in the derived class.  But (to my
> knowledge) the base class cannot call mStart in the derived class.  So
> how do I create the thread object in the base but the code run by the
> thread in the derived class?
> 
> -- 
> John W. Colby
> Colby Consulting
> 
> Reality is what refuses to go away
> when you do not believe in it
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> 






More information about the dba-VB mailing list