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

TMethodList.AllowDuplicates

Indicates if duplicate methods are allowed in the list.

Declaration

Source position: lazmethodlist.pas line 64

public property TMethodList.AllowDuplicates : Boolean
  read FAllowDuplicates
  write SetAllowDuplicates;

Description

AllowDuplicates is a Boolean property that indicates if duplicate entries for any given method are allowed in the method list. The default value for the property is False, and indicates that a duplicate method entry will be rejected and an exception will be raised for the error condition.

Changing the value in the AllowDuplicates property to False causes the existing Items in the list to be examined for duplicate methods. When a duplicate method is found, the Delete method is called to remove duplicate values for any of the method in the Items property.

AllowDuplicates is used in the implementation of the Add and Insert methods, and when setting a value in the Items property.

Version info

The default value for the property was change from True to False in version 1.3.

See also

TMethodList.Add

  

Adds the specified method to the list.

TMethodList.Insert

  

Inserts the specified method at the given position in the list.

TMethodList.Items

  

Provides indexed access to methods in the list.

TMethodList.Delete

  

Deletes the method stored at the specified position.


Version 4.0 Generated 2025-05-03 Home