[fpc-pascal] Assign() vs AssignTo()
Graeme Geldenhuys
mailinglists at geldenhuys.co.uk
Fri Feb 12 10:08:47 CET 2016
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
More information about the fpc-pascal
mailing list