On Wed, 8 Mar 2017, Dennis wrote:
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.
e.g.
class function TAncestor.GetCaption : String; //virtual
begin
if HasChild then
result := 'something'
else
result := 'something else';
end;
where HasChild is a boolean class function that tells me whether the
current calling class has children defined or now.
Is that possible?
Currently not, but I think that Sven Barth will implement something
for the new RTTI which will make this possible in the future.
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal