<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="monospace">Hi.<br>
<br>
The docs for 3.0 does not directly mention generics and inheriting
from another generic class, but I tried out with the code below.<br>
It compiled, ran and worked fine but since the docs do not
explicit mention it as a posibility I am a little reluctant to go
forward using this strategy if is not meant to work...<br>
<br>
(ps. i know this is incomplete code, but it should illustrate my
point)type<br>
<br>
type<br>
{ TMyType }<br>
<br>
generic TMyType<T> = class<br>
private<br>
Item: T;<br>
public<br>
constructor Create; virtual;<br>
end;<br>
<br>
{ TMyDerivedType }<br>
<br>
generic TMyDerivedType<T> = class(specialize
TMyType<T>)<br>
private<br>
Count: Integer;<br>
public<br>
constructor Create; override;<br>
end; <br>
<br>
TMyIntClass = specialize TMyDerivedType<Integer>;<br>
<br>
[...snipped both Create implementations...]<br>
<br>
var<br>
IC: TMyIntClass;<br>
<br>
begin<br>
M := TMyIntClass.Create();<br>
M.Item := 20;<br>
M.Count := 2;<br>
M.Free;<br>
end;<br>
<br>
<br>
<br>
<br>
</font>
</body>
</html>