Autor Beitrag
recall
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 449



BeitragVerfasst: Mi 10.09.03 00:33 
Hallo,

Ich weiss das es geht, ich weiss nur nicht mehr wie :( .
Also wie kriege ich eine Liste aller "Eigenschaften" einer TControl-Komponente: Kann TEdit, TPanel oder sonstwas sein !

Ich hoffe jemandem fällt dazu was ein ?
Danke im voraus.

Viele Grüsse.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Mi 10.09.03 07:10 
Ich find jetzt schon mehrere "seltsame" Beiträge von dir in dieser Richtung... ;) Was wird das? Eine WYSIWYG IDE?

Du solltest dich mal ein bisschen mit der RTTI beschäftigen, bei den Jedis gibt es ein paar Klassen und Interfaces wo man sich ganz gut anschaun kann wie das funktioniert.

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
recall Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 449



BeitragVerfasst: Mi 10.09.03 07:43 
Motzi hat folgendes geschrieben:
Ich find jetzt schon mehrere "seltsame" Beiträge von dir in dieser Richtung... ;) Was wird das? Eine WYSIWYG IDE?

Jo, genau das (naja fast) !
Zitat:

Du solltest dich mal ein bisschen mit der RTTI beschäftigen, bei den Jedis gibt es ein paar Klassen und Interfaces wo man sich ganz gut anschaun kann wie das funktioniert.
Mach ich schon, trotzdem die Frage bleibt bestehen ;)

Viele Grüsse.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Mi 10.09.03 08:06 
Also ich arbeite bei meinem X-Spy mti dynamischer Bindung von Objekt-Eigenschaften an die Treeview-Columns, dadurch hab ich ein sehr flexbiles System über das man bestimmen kann welche Informationen im Treeview aufscheinen sollen. Ich hab ein Objekt TWindowInfoObject, dass für jede Information über ein Fenster ein published property enthält. Beim Start wird dann eben immer eine Liste aller properties des Objekts erstellt.

Wie man diese Properties-Liste zusammenstellt hab ich mir großteils aus den Jedi-Klassen zusammengesucht.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
var
  pData: PTypeData;
  pIntData: PTypeData;
  PropData: ^TPropData;
  RecSize: Integer;
  Prop: PPropInfo;


  pData := GetTypeData(TypeInfo(TWindowInfoObject));
  PropData := @pData.UnitName;
  Inc(Integer(PropData), 1 + Length(pData.UnitName));

  Prop := PPropInfo(PropData);
  Inc(Integer(Prop), 2);
  RecSize := SizeOf(TPropInfo) - SizeOf(ShortString);
 
  for i := 0 to PropData.PropCount - 1 do
  begin
    // -> Prop ist ein Zeiger auf einen TPropInfo-Record (in TypInfo.pas deklariert), der Informationen über dein Property enthält

    Inc(Integer(Prop), RecSize);
    Inc(Integer(Prop), 1 + PByte(Prop)^);
  end;

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
recall Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 449



BeitragVerfasst: Mi 10.09.03 10:00 
:D Danke. Werde ich ausprobieren...

Viele Grüsse.
maximus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 896

Win XP, Suse 8.1
Delphi 4/7/8 alles prof
BeitragVerfasst: Mi 10.09.03 13:10 
hi.

beschäftige mich auch schon länger mit diesem thema! Man kann damit sehr schön dynamische architekturen aufbauen. JDV hat auf seine seite (ganz) unter eine recht brauchbare RTTI klasse, mit demo (die genau dein prob demonstriert) :

www.joachimdevries.d...wnload/download.html

_________________
mfg.
mâximôv
recall Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 449



BeitragVerfasst: Mi 10.09.03 13:34 
thx @maximus :D