This Kind of Array Cannot be Sorted
From Xojo Documentation
Error message
You tried to sort a Boolean array or an array of objects.
Examples
You tried to sort an array of objects instead of an array of alphas or numbers. For example, an array of DateTime objects cannot be sorted, but an array of SecondsFrom1970 properties of DateTime objects can be sorted, since the SecondsFrom1970 property is a Double.
This example array cannot be sorted.
Var d(2) as DateTime
d(0)=New DateTime(1965, 1, 1)
d(1)=New DateTime(1970, 1, 1)
d(2)=New DateTime(1950, 1, 1)
d.Sort
d(0)=New DateTime(1965, 1, 1)
d(1)=New DateTime(1970, 1, 1)
d(2)=New DateTime(1950, 1, 1)
d.Sort
The last line of this example produces the error message.
Var theTruth(3) as Boolean
theTruth(0)=True
theTruth(1)=True
theTruth(2)=False
theTruth(3)=False
theTruth.Sort
theTruth(0)=True
theTruth(1)=True
theTruth(2)=False
theTruth(3)=False
theTruth.Sort
See Also
Arrays.Sort method.