JVCL Help:TJvInspectorPropRegItem.Compare@TJvCustomInspectorData@TJvCustomInspectorRegItem

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Compares the item with another


Pascal

 functionCompare(constADataObj: TJvCustomInspectorData; constItem: TJvCustomInspectorRegItem): Integer; override;


Parameters

Parameters Description
const ADataObj: TJvCustomInspectorData Data layer instance use for comparison
const Item: TJvCustomInspectorRegItem Registration item to compare with


Return Value

If the specified item is a better match than this item, the negated match value is returned, otherwise the match value of this item is returned. If the items could not be compared, not the match value will be returned but the match percentages using the same rules as for the match value (ie. a negative number means the specified item is a better match, a positive number means this item is the better match).


Description

Compare compares the item with the specified item. The registration item uses two compare methods, Compare and CompareTo, which work in a similar way as Assign and AssignTo: if Compare doesn't know how to compare the two items, It swaps the items and calls CompareTo. The Compare method in TJvCustomInspectorRegItem will call the specified items' CompareTo method with itself as a parameter. The result of this call will be negated (because the order of the items was swapped) and returned.


See Also

TJvCustomInspectorRegItem.CompareTo


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page