From 27f18ffb0223c1f8186e9614083b2bfcb6c4d261 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sat, 9 Aug 2014 17:59:36 +0100 Subject: maximus: New method to remove an item from the UnitList --- examples/apps/ide/src/unitlist.pas | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'examples/apps/ide/src/unitlist.pas') diff --git a/examples/apps/ide/src/unitlist.pas b/examples/apps/ide/src/unitlist.pas index 37e9a9cd..e6c09a69 100644 --- a/examples/apps/ide/src/unitlist.pas +++ b/examples/apps/ide/src/unitlist.pas @@ -50,6 +50,7 @@ type function FindByName(const AUnitName: TfpgString): TUnit; function FileExists(const AFilename: TfpgString): Boolean; function AddFileName(const AFilename: TfpgString): TUnit; + function Remove(AUnit: TUnit): integer; procedure Add(NewUnit: TUnit); procedure Clear; procedure Delete(AIndex: integer); @@ -145,6 +146,11 @@ begin end; end; +function TUnitList.Remove(AUnit: TUnit): integer; +begin + Result := FList.Remove(AUnit); +end; + procedure TUnitList.Add(NewUnit: TUnit); var l: Integer; -- cgit v1.2.3-70-g09d2