Re: A superclass using a child classes' methods

2009-06-25 Thread Nick Craig-Wood
Kurt Schwehr wrote: > Thanks for the excellent response setting me straight. Now to figure > out what dumb thing I did to make my code not work... If you have trouble then post the code (or a cut down version demonstrating the code) - it always helps to have real code with real error messages

Re: A superclass using a child classes' methods

2009-06-24 Thread Kurt Schwehr
Jean-Michel, Thanks for the excellent response setting me straight. Now to figure out what dumb thing I did to make my code not work... -kurt On Jun 24, 12:23 pm, Jean-Michel Pichavant wrote: > Kurt Schwehr wrote: > > I'm trying to build an OO system for encoding and decoding > > datapackets.

Re: A superclass using a child classes' methods

2009-06-24 Thread Jean-Michel Pichavant
Kurt Schwehr wrote: I'm trying to build an OO system for encoding and decoding datapackets. I'd like the parent class to have an encode function that uses each of the child classes' packing methods. It appears that this works for attributes of children accessed by the parent, but not for method

Re: A superclass using a child classes' methods

2009-06-24 Thread Michael Torrie
Kurt Schwehr wrote: > I'm trying to build an OO system for encoding and decoding > datapackets. I'd like the parent class to have an encode function > that uses each of the child classes' packing methods. It appears that > this works for attributes of children accessed by the parent, but not > fo

A superclass using a child classes' methods

2009-06-24 Thread Kurt Schwehr
I'm trying to build an OO system for encoding and decoding datapackets. I'd like the parent class to have an encode function that uses each of the child classes' packing methods. It appears that this works for attributes of children accessed by the parent, but not for methods. Is that right? Fo