<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="+1"><font size="+1"><br>
<br>
>You can use either FillChar as you did or <font size="+1">use
"Self <font size="+1">:= Default(TTest);"</font></font></font> </font>
(default is a compiler intrinsics that returns a 0 value of the type
>you passed in, e.g. Nil for classes, '' for strings, 0 for ordinals
and for records all fields are set to 0)<br>
<font size="+1"><br>
How can I make it so that I only do the Self := Default() once in the
parent class constructor and don't have to repeat it in all its
descendant class constructor.<br>
<br>
<br>
I noticed in your example, you have to specify the class name TTest but
that implies in every descendant class, I have to replace it with the
Descendant class name.<br>
<br>
Can I do <br>
self := Default(ClassType) ?<br>
hoping it will return the descendant's class type?<br>
<br>
Dennis<br>
<br>
<br>
<br>
<br>
<br>
</font>
</body>
</html>