I have a very stupid question: I try to sort an array of a arbitrary object type.
But the Sort method is just not popping up, and when I just type it, the compiler stops with the message … doesn’t exists. While i’m pretty certain it’s an array that I want to sort.
See this screenshot?
What obviously very stupid thing I’m not seeing here?
Thanks a bunch for input!
Not sure why auto-complete doesn’t show it, but Sort does exist if you supply a delegate to a sort function. This is required because, otherwise, how would Xojo know how to sort your object?
Thanks for your answer, this is exactly what I’m doing indeed. But it does indeed work. I must have mistyped my delegate method. (Hence the not exist error)
So the only problem is the sort function not showing in auto-complete.
Glad to hear it. If you click the link that says “this answered my question”, it will show a check on the front page and make it easier for others to find the answer too. You can even click that next to your own post if you feel that’s more appropriate.
Thanks Kem, I totally forgot that link!