Entwickler-Ecke

Delphi Language (Object-Pascal) / CLX - Property - Ich stehe auf dem Schlauch


Jerk - Mo 14.07.08 19:51
Titel: Property - Ich stehe auf dem Schlauch

Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
 type TEasyMenue = Class(TObject)
 private
  fExecPath : String;
  fCaption  : String;
  lbCaption : TLabel;
  imLogo    : TImage;
  Procedure OnClick(Sender : TObject);
 public
  constructor Create;
  destructor Destroy;
  Property Caption read fCaption write fCaption;
  Property Path read fExecPath write fExecPath;
 End;


Warum:
E2147 Eigenschaft 'Caption' existiert nicht in Basisklasse
E2147 Eigenschaft 'Path' existiert nicht in Basisklasse

Was mache ich falsch -.-?


Danke für eure Hilfe.


Tilman - Mo 14.07.08 19:56

Weil du keinen Typ angibts (: String), denkt Delphi du möchtest eine als protected deklarierte Eigenschaft überschreiben. Also einfach den Typ angeben und es müsste funzen.


Jerk - Mo 14.07.08 20:03

*kopfgegenwand*

Danke!