This error message is issued if you try to make a call to a method of an ancestor type, but you are in fact not in a method.
program Produce;
type
TMyClass = class
constructor Create;
end;
procedure Create;
begin
inherited Create; (*<-- Error message here*)
end;
begin
end.The example tries to call an inherited constructor in procedure Create, which is not a method.
program Solve;
type
TMyClass = class
constructor Create;
end;
constructor TMyclass.Create;
begin
inherited Create;
end;
begin
end.The solution is to make sure you are in fact in a method when using this form of call.
|
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
|
What do you think about this topic? Send feedback!
|