#1 2013-08-01 06:41:25

general-e
Member
From: Germany
Registered: 2013-04-11
Posts: 7

AV in TRecordEditForm.WMUser

Hi,
I already found a small bug.
In TRecordEditForm.WMUser you set Focus to first Component.
In my Record the first property type is sftCreateTime.
So fFieldComponents[0] is nil ==> AV

if fFieldComponents<>nil then
  fFieldComponents[0].SetFocus; <<== AV

My fix:

procedure TRecordEditForm.WMUser(var Msg: TMessage);
var i: integer;
begin
  for i := 0 to Scroll.ControlCount-1 do
    Scroll.Controls[i].Repaint;  
  if fFieldComponents<>nil then
    for i := low(fFieldComponents) to high(fFieldComponents) do
      if assigned(fFieldComponents[i]) then
      begin
        fFieldComponents[i].SetFocus;
        break;
      end;
end;

Offline

#2 2013-08-01 08:28:40

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: AV in TRecordEditForm.WMUser

I've fixed the problem.
See http://synopse.info/fossil/info/ac541f1330

Thanks for your feedback and proposal!
smile

Offline

Board footer

Powered by FluxBB