On 2016-02-12 02:17, Dennis wrote: > Is there any sample codes to copy published properties (via RTTI) ? > e.g. psuedo code below
Take a look at tiOPF's TtiObject.AssignPublishedProps() method. https://sourceforge.net/p/tiopf/code/ci/tiopf2/tree/Core/tiObject.pas#l1156 The tiRTTI.pas unit also has very useful RTTI features - one being access to properties via "property paths". It walks a object hierarchy to get or set a property, and does error checking along the way. eg: tiSetProperty(lPerson, 'Address.City.Name', 'London'); 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