CoreClasses Xojo Plugin

IVariantComparer Interface

Use this Interface to define how a container of variant can be sorted. Containers like VariantArray and VariantCollection can be sorted when they get a reference to a class that implements IVariantComparer.

Interfaces don't actually do anything. A Interface is just a promise of what methods a implementor of a interface will have.

interface IVariantComparer


CompareImplement this method to have a valid class that implements the IVariantComparer Interface. The implemented method should return: -1 if variant a < variant b 1 if variant a > variant b 0 if variant a = variant b So what needs to be done is if(variant a < variant b) then return -1 elseif(variant a > variant b) then return 1 else return 0 end if


Supported Platforms:

  • MacOS X Carbon
  • MacOS X Cocoa 32 bit
  • MacOS X Cocoa 64 bit
  • Windows 32 bit
  • Windows 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM