Autor Beitrag
Daniel L.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 140
Erhaltene Danke: 14

W7, W8
TurboD Prof, Delphi Community
BeitragVerfasst: Mo 20.12.10 15:54 
Könnte man eigentlich an die Namen von Elementen, die in einer Typedefinition definiert wurden, herankommen, ohne die Namen selbst zu deklarieren?

z.B.:

showmessage (getElementName(DataSet1.State)); // dsInsert

Daniel
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 20.12.10 16:01 
Über RTTI geht da einiges, allerdings funktioniert es auch erst in neueren Delphiversionen (2009+) wirklich gut. Vorher hat man doch noch einige Einschränkungen mehr.

Hier findest du Beispiele, allerdings gehen die wohl erst ab Delphi 2009:
delphi.about.com/od/...009/qt/enum-rtti.htm

Was du willst, könnte aber auch vorher schon mit RTTI gehen.
Daniel L. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 140
Erhaltene Danke: 14

W7, W8
TurboD Prof, Delphi Community
BeitragVerfasst: Mo 20.12.10 16:40 
Whow - das Beispiel geht auch unter TurboDelphi - :D

Danke Dir!

Daniel