Go Up to Error and Warning Messages (Delphi)
An attempt has been made to publish a field in a class which is not a class nor interface type.
program Produce;
type
TBaseClass = class
published
xย : Integer;
end;
begin
end.
The program above generates an error because x is included in a published section, despite the fact that it is not of a type which can be published.
program Solve;
type
TBaseClass = class
Fxย : Integer;
published
property Xย : Integer read Fx write Fx;
end;
begin
end.
To solve this problem, all fields which are not class nor interface types must be removed from the published section of a class. If it is a requirement that the field actually be published, then it can be accomplished by changing the field into a property, as was done in this example.