I have been reading the new book Coding in Delphi by Nick Hodges. I just finished the chapters on RTTI and Attributes, and I am understanding some of the basics of RTTI, but I am wondering if anyone has any good examples of using RTTI and or attributes.
Asked
Active
Viewed 192 times
0
-
1Have a look at the source of Spring4D. You can find it on BitBucket. – pritaeas Mar 20 '14 at 14:20
-
See e.g. also http://stackoverflow.com/questions/17898212/where-are-the-delphi-attributes-real-world-examples – Jan Doggen Mar 20 '14 at 15:37
-
1Do you understand the advantages of Generics? Generics basically let you perform the same actions on any different type. RTTI is similar, but it goes deeper: it lets you perform the same actions on *the members of* any different type. The classic use case is (de)serialization; that's what it was first added for: to support DFM streaming. But there are plenty of other interesting uses as well... – Mason Wheeler Mar 20 '14 at 16:13
-
3Here is another one http://stackoverflow.com/questions/2657502 – Stefan Glienke Mar 20 '14 at 16:37
1 Answers
1
A very good starting point is delphi.about.com. Also you can search on StackOverflow to see questions about Delphi and RTTI tags, to see on what different users from here used RTTI.

RBA
- 12,337
- 16
- 79
- 126