3
votes
Vote UpVote

Object cloning using the high level RTTI

Delphi Haven – Someone’s probably demoed this before, and quite possibly demoed it better too, but hey, here’s my idea of generic object cloning using the high level RTTI. To be honest, in practice, I’m not sure this sort of thing – i.e., a completely generalised approach – is a very good idea, as indeed the small workarounds given for handling components and controls indicates. Makes a neat demo though I think: unit ObjectClone; interface type TObjectClone = record class function From(Source: T): T; static; end; implementation uses SysUtils, Classes, TypInfo, ...
Favorite? Off-Topic? Chris Rolliston @ 2011-06-09 01:50

Statistics

Visits: 1007
Votes: 3
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

François
knight_killer
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)