[fpc-pascal] how to determine if a class has descendant registered within the current program
dec12 at avidsoft.com.hk
Wed Mar 8 11:47:07 CET 2017
I have a many classes, one inherits from another one, in an ancestor
method, I want to test whether the calling class is a childless class.
class function TAncestor.GetCaption : String; //virtual
if HasChild then
result := 'something'
result := 'something else';
where HasChild is a boolean class function that tells me whether the
current calling class has children defined or now.
Is that possible?
More information about the fpc-pascal