#1 2017-03-09 18:38:11

ASiwon
Member
From: Poland
Registered: 2015-01-30
Posts: 82

Documentation - example for section 5.1.12. Record fields

Hello,

I think in examle in section 5.1.12. Record fields exists mistake:

class procedure TSQLMyRecord.InternalRegisterCustomProperties(
  Props: TSQLRecordProperties);
begin
  Props.RegisterCustomPropertyFromTypeName(self,'TGUID','GUID',
    @TSQLRecordCustomProps(nil).fGUID,[aIsUnique],38);  <----------- Here is a problem
end;

TSQLRecordCustomProps class does not contain field fGUID and compiler stops with error. I think this code should looks like:

class procedure TSQLMyRecord.InternalRegisterCustomProperties(
  Props: TSQLRecordProperties);
begin
  Props.RegisterCustomPropertyFromTypeName(self,'TGUID','GUID',
    @TSQLMyRecord(nil).fGUID,[aIsUnique],38);

best regards
Adam Siwon

Offline

Board footer

Powered by FluxBB