Thema: Delphi Neue Klasse erstellen

Einzelnen Beitrag anzeigen

barnti

Registriert seit: 15. Aug 2003
Ort: Mal hier mal da...
689 Beiträge
 
Delphi 7 Enterprise
 
#1

Neue Klasse erstellen

  Alt 20. Aug 2004, 06:49
Hallo,
hier mein Code:
Delphi-Quellcode:
unit Versioninfo;

interface
type
  TVersionInfo=class

  private
    function GetVersioninfo(Index: Integer): String;
  public
    constructor Create (ThisSourceFile: String);
    destructor Destroy; override;

    property Key[KeyName: String]: String read GetKey; // hier sagt der Compiler:
                                                        // [Error] Versioninfo.pas(13): Field or
                                                        // method identifier expected

    property CompanyName: String index 0 read GetVersionInfo write SetVersionInfo;
    property FileDescription: String index 1 read GetVersionInfo;
    property FileVersion: String index 2 read GetVersionInfo;
    property InternalName: String index 3 read GetVersionInfo;
    property Copyright: String index 4 read GetVersionInfo;
    property TradeMarks: String index 5 read GetVersionInfo;
    property OriginalFileName: String index 6 read GetVersionInfo;
    property ProductName: String index 7 read GetVersionInfo write SetVersionInfo;
    property ProductVersion: String index 8 read GetVersionInfo write SetVersionInfo;
    property Comments: String index 9 read GetVersionInfo;
    property BuildNumber: String read GetVersionInfo;
  end;

implementation

end.
Kann mir mal jemand auf die Srünge helfen, was ich falsch mache? Wie kann ich das Interface richtig implementieren?
Gruß,

Barnti
  Mit Zitat antworten Zitat