2014-03-12 21:56 GMT+01:00 Jim Leonard <trix...@oldskool.org>:

> On 3/12/2014 2:30 PM, Philippe wrote:
>
>> Type
>> TMethod = ( method_type_1, method_type_2, method_type_3);
>>
>
> Ah, clever -- create a Compare that switches based on what I tell it to
> do.  I like that, but as far as I can tell there's no way to tell a
> TSortedCollection to "resort" -- it's kept sorted only through inserts and
> deletes.
>

You (or the user) will never need to resotre the first order? I am asking
because you could as well simply create one SortedCollection for each sort
order and systematically insert each item in all those collections. The
overhead would be in the initial loading, but then switching would be
instantaneous.

-- 
Frederic Da Vitoria
(davitof)

Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to