[Lazarus] Proper implementation of TDataLink descendant

Luiz Americo Pereira Camara luizmed at oi.com.br
Fri Aug 5 02:52:20 CEST 2011


On 4/8/2011 13:53, Alexander Klenin wrote:
> On Fri, Aug 5, 2011 at 03:39, Luiz Americo Pereira Camara
> <luizmed at oi.com.br>  wrote:
>> On 4/8/2011 13:16, Alexander Klenin wrote:
>>> 1) Is there a way to totally disable DataSetChanged events in the dataset?
>> Yes implement dsBlockRead in TDataset
>>
>> http://docwiki.embarcadero.com/VCL/en/DB.TDataSet.BlockReadSize
>>
> Excellent! This seems to be what I need.
> Will a patch implementing event disabling be accepted?
>
> Also, the Borland's design seems very hackish to me.
> I would prefer to add DataEventMask: TDataEventSet property
> to allow user to mask events separately.
> On top of that, dsBlockRead state can be implemented
> as setting DataEventMask to full set.
> What do you think?

If i understand correct this would be a public property.

This can lead to conflict with the internal state.

User set Mask to some events than DisableControls set only some 
(different) events then BlockRead set to not send any events

Restoring the initial state is possible with a stack like structure but 
would add some complexity. So i would add the bare minimum to implement 
dsBlockRead

All in all, i agree that TDataset  has it's age and it would be welcome 
a fpc data abstraction designed from the ground to be used by reports, 
templates, charts, data controls

Luiz






More information about the Lazarus mailing list