![]() |
Object or class type requiered
Liste der Anhänge anzeigen (Anzahl: 1)
Hallo alle zusammen, ich habe hier einen Fehler mit dem ich nix anfangen kann, dieser kommt auch nur in alten Delphi Version (beim Versuch die Unit zu compiieren), in neueren, also >=XE lässt es sich ohne Probleme kompilieren.
Ich habe den Fehler mit einer kleinen Test Unit erzwungen, kann mir jemand helfen, danke euch.
Delphi-Quellcode:
Hier noch der Fehler als Screenshot im Anhang.
unit testShadow;
interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; private { Private declarations } public { Public declarations } end; var Form1: TForm1; type TDropShadowType =(dstNone, dstStandard); Test = class(TObject) private fDropShadow: TDropShadowType; procedure SetDropShadow (const value: TDropShadowType); public constructor create(); published property DropShadow: TDropShadowType read fDropShadow write SetDropShadow; end; implementation {$R *.DFM} procedure Test.SetDropShadow(const value: TDropShadowType); begin fDropShadow := Value; end; constructor Test.create(); begin DropShadow := TDropShadowType.dstStandard; end; end. Da das Teil eines Packages/ Komponente ist, sollte es auch in alten Versionen kompilierbar sein, vielen Dank. |
AW: Object or class type requiered
.. und so?
Delphi-Quellcode:
constructor Test.create();
begin DropShadow := {TDropShadowType.}dstStandard; end; |
AW: Object or class type requiered
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:33 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