Topic Path: Symbol Reference > Classes > TIdThreadSafeStringList Class > TIdThreadSafeStringList Methods > ObjectByItem Method
TIdThreadSafeStringList.ObjectByItem Method

Retrieves an object instance by an associated item value.

function ObjectByItem(
    const AItem: string
): TObject;
Value in Items used to locate the object instance. 

TObject - Object instance associated with the item value, or Nil.

ObjectByItem is a TObject function used to retrieve an object instance from the thread-safe data type using the associated item value specified in AItem. 

ObjectByItem calls Lock to enable resource protection while items in Value are searched using it's IndexOf method. The return value for the method is Nil when AItem cannot be found in the item values in Value. 

ObjectByItem call Unlock to disable resource protection on successful completion, or when an exception is raised.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.