Jump to content
Sign in to follow this  
Erix A.

Can somebody confirm this in 10.3?

Recommended Posts

Could somebody confirm this, before I report the error?

Here's the full code (simple form with a button on it).

When I add break point at the end of procedure TForm1.Button1Click(Sender: TObject);, in Delphi 10.2.3 I see the item, which was added, while in 10.3 I only see a pointer to it.

unit Unit1;

interface

uses
  System.Generics.Collections,
  Winapi.Windows,
  Winapi.Messages,
  System.SysUtils,
  System.Variants,
  System.Classes,
  Vcl.Graphics,
  Vcl.Controls,
  Vcl.Forms,
  Vcl.Dialogs,
  Vcl.StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

type
  TItem = class
  private
    Ff2: string;
    Ff1: string;
    procedure Setf1(const Value: string);
    procedure Setf2(const Value: string);
  public
    property f1: string read Ff1 write Setf1;
    property f2: string read Ff2 write Setf2;
  end;

type
  TItemList = class(TObjectList<TItem>);

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  item: TItem;
  list: TItemList;
begin
  item := TItem.Create;
  item.f1 := 'f1';
  item.f2 := 'f2';
  list := TItemList.Create;
  list.Add(item);
end;

{ TItem }

procedure TItem.Setf1(const Value: string);
begin
  Ff1 := Value;
end;

procedure TItem.Setf2(const Value: string);
begin
  Ff2 := Value;
end;

end.

 

10.3

d_102.png

 

10.2

d_103.png

Edited by Erix A.

Share this post


Link to post

This is due to inner TList structural changes.  FItems were moved from TList<T> into ListHelper class and its type has been changed into a pointer. 

 

AFAIK this issue (limited debugging) has been reported, but report is not yet publicly available

Share this post


Link to post

Looks like that is as designed. FItems in TListHelper has been a Pointer even in 10.2, but in 10.2 the TList holds FItems as array of T, while 10.3 doesn't have this anymore.

Share this post


Link to post
On 11/25/2018 at 10:43 AM, Dalija Prasnikar said:

AFAIK this issue (limited debugging) has been reported

Yup, did that.

 

To work around that issue, you can put list.List into the watches.

Edited by Stefan Glienke
  • Like 2

Share this post


Link to post

I'm wondering if they are working on this? Just had to remove all 10.3 new features from my project (e.g. declaring variables in the middle of the code) so that I could debug my app in 10.2.  

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×