flink.CellInhoud is a TFPGMap structure. I want to get all keyvalues to TStringarray, but keys needs a parameter to read. How do I read all keys at once.
TStringArray doesn't sort. Which option do I need to sort a single line of array in my case?
I don't want to sort TFPGMap, because it not sorting on name, but on pointer.
Lazarus 2.06 / FPC 3.04
Title: Re: Sorting TStringArray with keys from TFPGMap
Post by: PascalDragon on July 09, 2020, 01:21:32 pm
You can use Generics.Collections in FPC as well. For 3.0.4 you can download it here (https://github.com/maciej-izak/generics.collections), for 3.2 and newer its integrated into the distribution.
Title: Re: Sorting TStringArray with keys from TFPGMap
Post by: mangakissa on July 09, 2020, 01:50:43 pm
Yes, I know. But is there also a solution for fgl?
Title: Re: Sorting TStringArray with keys from TFPGMap
Post by: PascalDragon on July 09, 2020, 04:35:45 pm
You need to assign a OnKeyCompare (https://freepascal.org/docs-html/current/rtl/fgl/tfpgmap.onkeycompare.html) event handler.