Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2019-01

Custom sorted stringlists

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Franz Müller

Hi, after a lot of testing, I think it is safe and I have submitted this patch to the bugtracker

https://bugs.freepascal.org/view.php?id=34873

With this patch, it is possible to provide a custom compare function to a stringlist and thus allow the stringlist to keep the items automatically sorted according to the custom compare routine.

In addition, this custom compare function can also use fields of the objects associated with the strings.

I would also be willing to update the documentation accordingly, but I have no idea how to do that.

Franz

Reply by email

Michael Van Canneyt
to Franz Müller
Franz Müller wrote 9 lines
Hi, after a lot of testing, I think it is safe and I have submitted this patch to the bugtracker https://bugs.freepascal.org/view.php?id=34873 With this patch, it is possible to provide a custom compare function to a stringlist and thus allow the stringlist to keep the items automatically sorted according to the custom compare routine.

I have assigned it to myself and look at it during the weekend.

Show quoted text 5 lines
In addition, this custom compare function can also use fields of the objects associated with the strings. I would also be willing to update the documentation accordingly, but I have no idea how to do that.

Thanks for offering, but please don't bother, I will take care of that. In each case, this feature will not make it in 3.2, and the documentation is only updated just before a release, so it has no point including it now.

In each case, thank you for your efforts.

Michael.

Reply by email