[fpc-pascal] Assign() vs AssignTo()

Dennis Poon dennis at avidsoft.com.hk
Fri Feb 12 07:54:46 CET 2016



Martin Schreiber wrote:
> On Friday 12 February 2016 03:17:57 Dennis wrote:
>> Is there any sample codes to copy published properties (via RTTI) ?
>> e.g. psuedo code below
>>
>>     for i := 0 to properties.count -1 do begin
>>        case properties[i].type of
>>           vtInteger :  properties[i].AsInteger :=
>> Source.PropertiesByName(Properties[i].Name).AsInteger;
>>          vtdouble : ....
>>          vtString : ...
>>        end;
>>     end;
>>
> MSEgui has such code for "trttistat" component, please see
> https://gitlab.com/mseide-msegui/mseide-msegui/raw/master/lib/common/kernel/mserttistat.pas
> although it is specialised for saving and editing options.
>
> Martin
> _______________________________________________
>
Thank you.

Dennis



More information about the fpc-pascal mailing list