[lazarus] Questions about DB status

Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Sun Sep 14 11:30:24 EDT 2003




On Sun, 14 Sep 2003, Marc Weustink wrote:

> At 21:21 13-9-2003, Andrew Johnson wrote:
> >On Sat, 2003-09-13 at 11:19, Andrew Johnson wrote:
> > > Actually I am not so sure on this for one reason. I am still not sure
> > > _why_ it needs this, but I just found and added the following routine to
> > > it(I find its existence atm utterly pointless and silly but ..
> > > compatibility?)
> >
> >The more I think the more I think we should scratch it.
>
> I don't.
>
> >I see no use whatsoever even for backward compatibility.
>
> It isn't a matter of backward compatebility, I think it is needed.
>
> >When would anyone want to
> >focus a FielddataLink 's control and not know the control already?
>
> IF I look at the implementation of it in D7 the FocusControl makes sense.
> It is defined in DB and is part of TField and it is used when checking
> required fields. The DB unit has no knowledge about controls itself, it
> only signals though the DataLink that an attached control should get focus.
> For the controls there is the derived TFieldDataLink.

It can also be used when checking the contents of a field: e.g. for a
numeric field, when the user enters a 123.34 for an integer field, then an
'Invalid integer' message should be given, and the control should get focus.


>
> How would you suggest would the TFieldDataLink know which control is attached ?

Normally, the control creates a descendent of TFieldDataLink and passes
itself as the control to the constructor.

Michael.






More information about the Lazarus mailing list