Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2023-09

Request for review of patch for issue 40261

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bart

Hi,

Issue 40261 is about TStrings.AddObject issueing 2 consecutive OnChange events (and in the first one the to be added object is unassigned when accessing Objects[] property) when using InsertObject, AddObject and AddPair.
This is Delphi incompatible.

The patch attached to
https://gitlab.com/freepascal.org/fpc/source/-/issues/40261#note_1406426712 fixes this at the expense of calling BeginUpdate/EndUpdate (and for that use a try..finally construct).

I kindly ask for this patch to be reviewed by one of the devels.

Bart

Reply by email

Michael Van Canneyt
to Bart
Bart wrote 14 lines
Hi, Issue 40261 is about TStrings.AddObject issueing 2 consecutive OnChange events (and in the first one the to be added object is unassigned when accessing Objects[] property) when using InsertObject, AddObject and AddPair. This is Delphi incompatible. The patch attached to https://gitlab.com/freepascal.org/fpc/source/-/issues/40261#note_1406426712 fixes this at the expense of calling BeginUpdate/EndUpdate (and for that use a try..finally construct). I kindly ask for this patch to be reviewed by one of the devels.

I did so, I left a small request.

Michael.

Reply by email