Registriert seit: 10. Sep 2004
Ort: Mönchengladbach
833 Beiträge
Delphi 7 Enterprise
|
Re: RTTI {$M+}bei TObject
8. Mär 2007, 20:48
Komisch, bei mir tuts das...
Delphi-Quellcode:
Unit Unit1;
Interface
Uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
Type
{$M+}
TTest = Class( TList )
Private
{ Private-Deklarationen }
FTT: Integer;
Published
{ Published-Deklarationen }
Property TT: Integer Read FTT Write FTT;
End;
{$M-}
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
FTe: TTest;
public
{ Public-Deklarationen }
Property Te: TTest Read FTe Write FTe;
End;
Var Form1: TForm1;
Implementation
{$R *.dfm}
Procedure TForm1.FormCreate( Sender: TObject );
Begin
Te := TTest.Create;
End;
Procedure TForm1.FormDestroy( Sender: TObject );
Begin
If Assigned( Te ) Then FreeAndNil( FTe );
End;
Procedure TForm1.Button1Click( Sender: TObject );
Begin
Edit1.Text := IntToStr( Integer( Te.ClassInfo ) );
End;
end.
Bye Christian
Christian
|
|
Zitat
|