[Lazarus] Proper implementation of TDataLink descendant

Alexander Klenin klenin at gmail.com
Fri Aug 5 03:13:00 CEST 2011


On Fri, Aug 5, 2011 at 11:52, Luiz Americo Pereira Camara
<luizmed at oi.com.br> wrote:
> 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

I suggest simply to declare that Mask is "volatile", i.e. it will be
overwritten by changes to State.
Alternatively, there could be separate Mask and InternalMask, the union of which
will be actually applied.

> 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

Probably yes, but the enrty barrier for such solution is very high.
Maybe TDataset can be slowly improved instead.

-- 
Alexander S. Klenin




More information about the Lazarus mailing list