Not sure whether this should happen or not.
If you do:
It causes an unhandled memory exception.
I realise this is because it's trying to access the compare method of the null object, but would it not be better to simply stop the sort there rather than throw an exception?
*EDIT*
for instance, the first two elements could contain a valid object, but the array can't be sorted until all elements are valid.
If you do:
Local a:Object[5] Rem 'uncomment this to solve it since they are no longer null For Local i:Int = 0 To 4 a[i] = New TImage Next EndRem a.sort()
It causes an unhandled memory exception.
I realise this is because it's trying to access the compare method of the null object, but would it not be better to simply stop the sort there rather than throw an exception?
*EDIT*
for instance, the first two elements could contain a valid object, but the array can't be sorted until all elements are valid.