[fpc-pascal]Class Identification?

Jon David Sawyer bq at badquanta.net
Sun Mar 23 16:00:44 CET 2003


> for descendants of TObject, there's a method 'ClassType', e. g.
> 
> ***
> begin
>   if MyObject.ClassType = CCalculator then begin
>     bla bla
>   end else bla bla
> end;
> ***
> 
> see reference manual - system unit. this only works if a descendant of 
> TObject has been assigned to MyObject.
> 
> Anton.
Thanks. ^_^  I just maid my base class a descendant of TObject and that 
took care of it!




More information about the fpc-pascal mailing list