The array of objects must itself be an object, or part of one.
Create a method of that object which performs a sort on the array, using some sorting key. Swap sort is the simplest, just comparing adjacent items and swapping them if required. It is of complexity N squared, so if your list is very long something like quick sort might be better.
Both of these need little extra memory.
If the object has any events, one of these could be used to call the sort when required. More likely you will have to call the sort externally whenever you read or write to the array of objects.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to