Internet Direct (Indy)
Home
PreviousUpNext
TIdThreadSafeStringList.ObjectByItem Method

Retrieves an object instance by an associated item value.

Pascal
function ObjectByItem(
    const AItem: string
): TObject;
Parameters 
Description 
AItem 
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.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.