![]() |
Klasse TObjectList - neue Property hinzufügen?
Hi,
ich habe ein Objekt der Klasse TObjectList. Ich würde gerne eine neue property hinzufügen.
Delphi-Quellcode:
Als Fehlermeldung bekomme ich:
property AnzahlAutos : Integer; read getAutoAnzahl;
Code:
Wie kann ich denn eine neue Property hinzufügen? Das wird doch wohl gehen, oder?!
[Pascal Fehler] Auto.pas(19): E2147 Eigenschaft 'AnzahlAutos' existiert nicht in Basisklasse
|
Re: Klasse TObjectList - neue Property hinzufügen?
Mach doch einen neue Klasse, die Du von TObjectList ableitest...dann kannste Dich austoben. Aber einem Objekt einer Klasse kann man nicht mehr erweitern...das ist normal.
Sherlock |
Re: Klasse TObjectList - neue Property hinzufügen?
Delphi-Quellcode:
Ohne das ; - sonst denkt Delphi, dass du eine Property der Basisklasse auf ein anderes Sichbarkeitsniveau heben willst.
property AnzahlAutos : Integer read getAutoAnzahl;
|
Re: Klasse TObjectList - neue Property hinzufügen?
Höchstens per Class Helper
|
Re: Klasse TObjectList - neue Property hinzufügen?
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:34 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz