I have problems with TStrinList...
procedure TotaliseByNames;
var
SL : TStringList;
I1, I3 : integer;
vElement: TDOMElement;
vInputList: TDOMNodeList;
begin // vInputList is out of scope but is another TStringList
SL := TStringList.Create;
SL.Sorted := true;
for I1 := 0 to pred(vInputList.Count) do begin
vElement := vInputList[I1];
SL.Find(vElement['name'], I3);
if I3 = -1 then // does not exist then
SL.AddObject(vElement['name'], vElement) // create the first
else begin
{some other code that modifies vElement with aritmethic operations...}
end;
FAnotherList.Assign(SL);
end;
on the Finding it breaks the program...
Also I tried with IndexOf and it shows a number like 8261232 instead of -1,
I checked the code inside and it has some things to fix, for example
in stringl.inc line 936 instead of Result:=Result+1; it must be inc(Result), and
on sorted list, the add or insert method ought to add it on the right place.