9
votes
Vote UpVote

Locations vs Values: using RTTI to work with value types

Entropy Overload – Delphi's Rtti unit is designed in substantial part around TValue, a kind of hold-all record that should be capable of containing almost any Delphi value, along with type information for that value. However, this means that when you're working with value types, such as static arrays and records, modifying the values when stored in a TValue is modifying that copy, stored inside the TValue. If you want to manipulate a field (F1) of a record which is itself a field (F2) of another type, you need to first copy the F2 fields' value out into a TValue, then modify F1 in the TValue, and then copy it ...
Favorite? Off-Topic? Barry Kelly @ 2010-05-11 21:40

Statistics

Visits: 666
Votes: 9
Favorites: 2
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Aleksey Timohin
Charles Ardour
jamiei
Jørn E. Angeltveit
knight_killer
Mohammed Nasman
Tier777
ua.Skywalker
vcldeveloper
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)