crydev Messages: 151 Registered: October 2012 Location: Netherlands
Experienced Member
koldo wrote on Mon, 19 November 2012 16:09
Hello Crydev
AFAIK ArrayCtrl Sort() uses Value comparison that in case of Strings uses DefaultLanguageCompare() function in LangInfo.cpp. However String comparison uses String0::Compare() in AString.hpp.
If you prefer the second, I suppose that you have to create a comparison function like this;
int MyStringCompare(const Value& a, const Value& b) {
return a.ToString() < b.ToString();
}
and refer to it in Sort:
array.Sort(columnToSort, MyStringCompare);
I have not tested it. Does it work?
I tested this. It did work by meaning of: it works, but it didn't work by meaning of it did what I was expecting.
You are saying that the sorting of strings in the ArrayCtrl is done by using the default language rules for strings and the sorting of a vector by using the operator you provided is done by using standard english rules. Am I correct? If so, I think I would need the language specific way of sorting for my vector.