Registriert seit: 20. Jan 2006
Ort: Lübbecke
11.584 Beiträge
Delphi 12 Athens
|
AW: W1009: Redeklaration verbirgt ein Mitglied in der Basisklasse
30. Dez 2010, 17:09
Geht's auf diese Art?
Delphi-Quellcode:
type
TBase = class
private
FFontName: string;
public
property FontName: string read FFontName write FFontName;
end;
TDerived = class(TBase)
private
function FontNameFromIndex(Value: Integer): string;
function GetFontName: Integer;
function GetIndexOfFontName(const Value: string): Integer;
procedure SetFontName(const Value: Integer);
public
property FontName: Integer read GetFontName write SetFontName;
end;
function TDerived.FontNameFromIndex(Value: Integer): string;
begin
Result := '';
{ TODO : mapping Index -> FontName }
end;
function TDerived.GetFontName: Integer;
begin
Result := GetIndexOfFontName(inherited FontName);
end;
function TDerived.GetIndexOfFontName(const Value: string): Integer;
begin
Result := -1;
{ TODO : mapping FontName -> index }
end;
procedure TDerived.SetFontName(const Value: Integer);
begin
inherited FontName := FontNameFromIndex(Value);
end;
|