Delphi TStringList not allowing duplicatesPosted by BeckyR on February 05, 2002 at 15:22:02:
How do I use the duplicates property to raise an exception when a duplicate string is
added to a Delphi stringlist? for iTemp := 0 to frmData.sgClasses.Rowcount - 1 do
begin
try
slGeneratedTemp.Add(frmData.sgClasses.Cells[11,iTemp]);
except on EStringListError do showmessage('duplicate scan codes');
end;
end;
|
|