Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread AV in IDE
Sat, Apr 16 2016 10:39 AMPermanent Link

squiffy

Telemix Ltd.

Avatar

Create a new visual project and put the code below into Unit1.
Hit F9 to compile & run, and you will see the attached AV.

If I remove the

   var
      myclients : TClient;

it goes away.  It also goes away if I move the class declarations to the interface section, which is undesirable for me as they then become public.

=========

unit Unit1;

interface

uses WebCore, WebUI, WebForms, WebCtrls;

type

  TForm1 = class(TForm)
     procedure Form1Create(Sender: TObject);
  private
     { Private declarations }
  public
     { Public declarations }
  end;

var
  Form1: TForm1;

implementation

type TRecord = class
  id : integer;
  name : string;
end;

type TClient = class(TObject)
  private
     clients : array of TRecord;

  public
     constructor Create; override;
end;

constructor TClient.Create;
begin
  inherited Create;
  SetLength(Clients,0);
end;

procedure TForm1.Form1Create(Sender: TObject);
var
  myclients : TClient;

begin
  myclients:=TClient.Create;

end;

end.



Attachments: ewb-av-constructor.PNG
Mon, Apr 18 2016 10:27 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< Create a new visual project and put the code below into Unit1.  Hit F9 to compile & run, and you will see the attached AV. >>

I'm not seeing this here with the 2.05 candidate.  I'll have to go back and check 2.04 to see if it shows anything.

Tim Young
Elevate Software
www.elevatesoft.com
Image