[Lazarus] Example of TObjectList sorting

Denis Kozlov dezlov at gmail.com
Sun May 22 08:30:49 CEST 2016


On 21 May 2016 at 13:49, Richard Mace <richard.mace at gmail.com> wrote:

> ​Would I call the List.sort externally, or would the List call sort when
> an Add has happened, as I don't seem to have a ".sort" method on my
> TObjectList?
>

You need to call List.Sort yourself, it is not sorted automatically when
you add more elements.

TObjectList does have a Sort method, since it descends from TList class.

Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160522/36121bad/attachment-0003.html>


More information about the Lazarus mailing list