[fpc-devel] Recent changes to TField.SetData

LacaK lacak at zoznam.sk
Mon Apr 4 07:15:01 CEST 2011


Hi,
This fix 
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl-db/src/base/fields.inc?r1=17199&r2=17220
fixes mising call to TField.Validate (before data are written into 
record buffer) and adds also call to TField.DataChanged (after data are 
written)

But It seems to me, that DataChanged is now called 2 times

First in TDataSet descendants in SetFieldData method (see 
bufdataset.pas, dbf.pas, paradox.pp, meds.pp) and second in above 
mentioned place.

So it would be good remove this call from TDataSet descendants. For 
example for bufdataset.pas:

 1860   if not (State in [dsCalcFields, dsFilter, dsNewValue]) then
 1861     DataEvent(deFieldChange, Ptrint(Field));

Laco.



More information about the fpc-devel mailing list