I keep getting this following DCC error, published field ‘name’ is not a class or interface type for the following class.
TGroup = class
name:string[32]; <<<========================
rwFeatures:TFeatures;
roFeatures:TFeatures;
levels:TLevels;
private
public
constructor Create;
procedure Read(var f:file);
procedure ReadOld(var f:file);
procedure Write(var f:file);
end;
What does it mean?
The class is compiled with the Emit runtime type information setting enabled. When the class is compiled with runtime type information, the default visibility is
published. Which means that the short string field ispublished. And short string fields are not allowed to be published.The documentation says:
That’s a pretty stringent requirement. It means that you can’t publish integer or boolean fields, for example.
I suspect this limitation is because the primary use for published fields is for object references. Think of the components on a form.
Solve the problem using one of these options: