help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions] Reference for unit 'contnrs' (#fcl)

TObjectList.FindInstanceOf

Search for an instance of a certain class

Declaration

Source position: contnrs.pp line 86

public function TObjectList.FindInstanceOf(

  AClass: TClass;

  AExact: Boolean;

  AStartAt: Integer

):Integer;

Arguments

AClass

  

Class of which result should be a descendent

AExact

  

Should the class of the result be exactly the requested class.

AStartAt

  

Index to start the search

Function result

Instance found or Nil if none was found

Description

FindInstanceOf will look through the instances in the list and will return the first instance which is a descendent of class AClass if AExact is False. If AExact is true, then the instance should be of class AClass.

If no instance of the requested class is found, Nil is returned.

Errors

None.

See also

TObjectList.IndexOf

  

Search for an object in the list

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505