blob: 220ee38ca16dda61ab2fbe067e1ea2809a6e6a50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{ %version=1.1 }
program dumpprops;
{$ifdef fpc}
{$mode objfpc}
{$endif}
uses
Classes, TypInfo;
type
TBaseTest = class(TPersistent)
private
FCaption: String;
FNext: Integer;
FNext6: Integer;
protected
public
property Caption: String read FCaption write FCaption;
published
property Next: Integer read FNext write FNext;
property Next6: Integer read FNext6 write FNext6;
end;
TTest = class(TBaseTest)
private
FNext2: Integer;
protected
public
published
property Caption;
property Next2: Integer read FNext2 write FNext2;
end;
var
p : PPropInfo;
t : TTest;
begin
t:=TTest.Create;
p:=GetPropInfo(t,'Next');
if (p<>nil) and
(p^.name='Next') then
writeln('Success')
else
begin
writeln('ERROR! Got: ',p^.name);
halt(1);
end;
end.
|