Hi, In TPersistent, we have two virtual methods. Assign() which calls AssignTo().
1) Why are they both virtual? It seems like Assign() is what I call a template method, farming its work out to other helper methods - in this case, AssignTo(). Normally template methods are not virtual, but their helper methods (the ones doing the actual work) are. So again, why is Assign() virtual? 2) Now seeing that both are virtual, and that is probably not going to change in the RTL, which method is the preferred method to override so you have the ability to do MyObject.Assign(MySource)? I've been overriding Assign(), but thinking that maybe I should have overridden AssignTo() instead. ps: The FPC (pdf) documentation for TPersistent.Assign() has a "See Also" reference to TPersistent.AssignTo(). But that link doesn't work, because AssignTo is Protected, and the RTL documentation doesn't include Protected methods. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal