[lazarus] Questions about DB status

Andrew Johnson acjgenius at earthlink.net
Sat Sep 13 11:19:18 EDT 2003

On Sat, 2003-09-13 at 11:11, Michael.VanCanneyt at Wisa.be wrote:
> Good idea.
> Please keep in mind 2 things:
> 1. Non-visual stuff can go in the FCL.
>    TFieldDatalink (and some others as well maybe) belongs there, I think.
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 ..

 Delphi Help ->
    Call FocusControl to give the Control associated with this
    object the input focus. FocusControl checks whether the Control can
    input focus, and if so, calls its SetFocus method to move focus to
  <-- Delphi Help

procedure TFieldDataLink.FocusControl(Field: TFieldRef);
  if Assigned(Field^) and (Field^ = FField) then
    If Assigned(Control) and (Control is TWinControl) then
      If TWinControl(Control).CanFocus then begin
        Field^ := nil;

so.. in this _one_ routine, we have a visual control dependency.
if we don't need this and can remove it then I agree it should go in FCL
db, but otherwise its stuck in LCL dbctrls.  :)

> 2. The FCL implementation of TDataset has no support for persistent fields
>    yet. For this, the TField/TFields should be rewritten as a
>    TCollectionItem/TNamedCollection pair, not TComponent/TList as it is now.

ok. I will look into this later on if someone else doesn't get to it


More information about the Lazarus mailing list