I have a base class like the following.
TMakerObject = class
...
public
method Clone:TControlObject; virtual; abstract;
end;
I want to make the method clone abstract. So, base class doesn't need to implement or define this method. However, the subclasses can define their own clone method.
But Compiler keep giving me this error - non-abstract class does not provide implementation for abstract method.
If so, then how is this done?
Thanks,
(this isn't specific to Delphi) By saying the method is abstract
you are saying that the base class does not define an implementation for it. So there are two options for how the language might behave:
Favouring compile-time problems over execution-time ones, the language designers went with the second option.