Here's a curious phenomenon. I have a Delphi 10.3 application that has started writing duplicate entries to a TIniFile
.
Here's the code:
with TIniFile.Create(UserDatFileName) do
try
WriteInteger(SFormName, 'Top', AForm.Top);
WriteInteger(SFormName, 'Left', AForm.Left);
WriteInteger(SFormName, 'Height', AForm.Height);
WriteInteger(SFormName, 'Width', AForm.Width);
WriteString(SFormName, 'WindowState', SWindowState);
finally
Free;
end;
This has worked fine for years. Now, all of a sudden, I'm getting output like this:
[fMainForm]
Top=0
Left=0
Height=556
Width=671
WindowState=wsMaximized
pnlNavigation.Width=165
TreeListcxTreeListModule.Width=161
Top=0
Left=0
Height=556
Width=671
WindowState=wsMaximized
pnlNavigation.Width=165
TreeListcxTreeListModule.Width=161
Top=0
Left=0
Height=556
Width=671
WindowState=wsMaximized
pnlNavigation.Width=165
TreeListcxTreeListModule.Width=161
... etcetera etcetera
Any suggestions about why this might be happening? I thought TIniFile
value pairs were supposed to be unique within each section?