AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Neue Klasse erstellen

Ein Thema von barnti · begonnen am 20. Aug 2004 · letzter Beitrag vom 20. Aug 2004
Antwort Antwort
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
geesmith

Registriert seit: 17. Jan 2003
Ort: Frauenfeld
32 Beiträge
 
Delphi XE5 Architect
 
#2

Re: Neue Klasse erstellen

  Alt 20. Aug 2004, 06:55
Tja barnti

Wo hast du denn eine Variable oder Funktion namens "GetKey"??
  Mit Zitat antworten Zitat
Benutzerbild von plumper
plumper

Registriert seit: 15. Jul 2004
Ort: Ahrensburg
88 Beiträge
 
Delphi 7 Professional
 
#3

Re: Neue Klasse erstellen

  Alt 20. Aug 2004, 07:02
Schätze er wird bei 'SetVersionInfo' ebenfalls Probleme bekommen...

Sonnige Grüße,

Jens
  Mit Zitat antworten Zitat
barnti

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

Re: Neue Klasse erstellen

  Alt 20. Aug 2004, 07:14
Hi,
ok, is zu früh!
Habe ich inzwischen im Implementationsteil hinzugefügt! Sorry für die Mühe und Danke!
Gruß,

Barnti
  Mit Zitat antworten Zitat
Benutzerbild von Bernhard Geyer
Bernhard Geyer

Registriert seit: 13. Aug 2002
17.173 Beiträge
 
Delphi 10.4 Sydney
 
#5

Re: Neue Klasse erstellen

  Alt 20. Aug 2004, 07:18
Falls Du dir das Coden sparen willst: In der Jedi Code Library gibt es die Fertige Klasse TJclFileVersionInfo
Windows Vista - Eine neue Erfahrung in Fehlern.
  Mit Zitat antworten Zitat
barnti

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

Re: Neue Klasse erstellen

  Alt 20. Aug 2004, 07:22
Hallo,

den Code hatte ich leider nur unvollständig. Deshalb meine Probleme! Jetzt kannn ich mal nachlesen.
Danke!
Gruß,

Barnti
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:03 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz