I tried to construct a class system in Delphi. The classes TFieldSpec
and TTableSpec
refer to each other through object properties.
type
TFieldSpec=class(Tobject)
private
FTableSpec : TTableSpec;
public
property TableSpec : TTableSpec read FTableSpec;
end;
TTableSpec=class(Tobject)
private
FFields : array[1..100] of TFieldSpec;
end;
When I compile this, I get this error:
[Error] Objects.pas(66): Undeclared identifier: 'TTableSpec'
How to construct these class types?