[Overview][Classes][Procedures and functions][Index] Reference for unit 'LookupStringList' (#lazutils)

TLookupStringList.AddObject

Adds the specified values to the Strings and Objects in the list.

Declaration

Source position: lookupstringlist.pas line 51

public function TLookupStringList.AddObject(

  const S: string;

  AObject: TObject

):Integer; override;

Arguments

S

  

Value added to the Strings property.

AObject

  

Value added to the Objects property.

Function result

Ordinal position for the new values, or -1 when duplicates are not allowed.

Description

AddObject is an overridden Integer function used to add the specified values to the Strings and Objects in the list. AddObject calls the Add method to add the value in S to Strings.

The return value contains the ordinal position in Strings where the value was stored, or -1 when duplicate values are not allowed. If the return value is not -1, the Objects property is updated to include the value in AObject at the specified position.

See also

TStrings.AddObject


Version 4.0 Generated 2025-05-03 Home