<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-03-19 19:01 GMT-03:00 Timothy Groves <span dir="ltr"><<a href="mailto:the.tail.kinker@gmail.com" target="_blank">the.tail.kinker@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Is there a drop-dead simple way to clone an object?<br>
<br>
I've got a small tree of classes (tBaseProfile, and four descendants of such). Only the descendant classes are instantiated. I need to be able to create new copies of these objects for use in other lists.<br>
<br>
At the moment, I am writing a Duplicate method that returns the new object. But this means assigning all of the data to the duplicated object. There must be an easier way!</blockquote><div><br></div><div>I'm working on something right now (using RTTI). I need to clone any object, even third party objects. I use an OPF and a HTTP framework and both work directly with objects, and now came the need to clone objects (<a href="http://goo.gl/VVTFcu">http://goo.gl/VVTFcu</a>).</div>
<div><br></div><div>I'll post the code here soon ...</div><div><br></div></div>-- <br>Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a>
</div></div>