How to access base (super) class in Delphi?

Posted by Niyoko Yuliawan on Stack Overflow See other posts from Stack Overflow or by Niyoko Yuliawan
Published on 2012-09-20T03:26:30Z Indexed on 2012/09/20 3:37 UTC
Read the original article Hit count: 80

Filed under:
|

In C# i can access base class by base keyword, and in java i can access it by super keyword. How to do that in delphi? suppose I have following code:

  type
    TForm3 = class(TForm)
  private
    procedure _setCaption(Value:String);
  public
    property Caption:string write _setCaption; //adding override here gives error
  end;

  implementation


procedure TForm3._setCaption(Value: String);
begin
  Self.Caption := Value; //it gives stack overflow      
end;

© Stack Overflow or respective owner

Related posts about delphi

Related posts about inheritance