// We assume that when we insert, we respect the order, so we dont set Sorted=true
end;
function CompareRecordLists(Item1, Item2: Pointer): Integer;
begin
if TFlxRecordList(Item1).ListName < TFlxRecordList(Item2).ListName then Result:=-1 else if TFlxRecordList(Item1).ListName > TFlxRecordList(Item2).ListName then Result:=1 else Result:=0;
end;
procedure TFlxMasterList.Sort;
begin
inherited Sort(CompareRecordLists);
Sorted:=true;
end;
function TFlxMasterList.Find(const aItem:string ; var Index: integer): boolean;
Var
L, H, I, C: Integer;
begin
if not Sorted then Sort;
Result := False;
L := 0;
H := Count - 1;
while L <= H do
begin
I := (L + H) shr 1;
if Items[i].ListName < aItem then C:=-1 else if Items[i].ListName>aItem then C:=1 else C:=0;