[fpc-pascal]init a class from another class
Drslump at btopenworld.com
Mon Oct 8 20:35:11 CEST 2001
I cannot find a solution to a problem I've got programming a
library. I want to initialze a class which is passed as a
parameter to another class method. It looks like this :
tCoDec = CLASS
constructor init; VIRTUAL;
destructor done; VIRTUAL;
tmyCoDec = CLASS (tCoDec)
constructor init; OVERRIDE;
destructor done; OVERRIDE;
pCodecList = ^tCodecList;
tCodecList = RECORD
tMain = CLASS
registerCoDec (var cd :tCoDec);
cd := "class of cd".init;
I don't know how to do this or if it's possible. It's the first time I use classes and maybe the first I use OOP at all, so maybe this is completely impossible to do.
Any help will be appreciated, thks so much.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal