Sign in Join
FPDoc Onlineexperiment

TLookupStringList.AddObject function

Member of TLookupStringListpublicIn unit LookupStringList

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

Declaration

pascal
function 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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.