[Lazarus] Lazarus support for Sorting is completely inadequate.

Avishai avishai.gore at gmail.com
Sat Dec 1 19:26:58 CET 2012


Another point about Sorting.  Am I the only one that is bothered by
the fact that TListBox and TComboBox default sort is not Case
Sensitive?  Example:  Put in a list of your name over and over.  Use
caps on only some of them in random order.  Then do a sort.  To me, it
should group the uppercase together in one group and the lowercase in
another group.  That's not what happens.  I think the same is true for
TStringList and TStringGrid, but at least TStringList has an override.
 TStringList.CaseSensitive.

So to get acceptable results for TListBox sort, I have to first assign
the list to a TStringList, Set TStringList.CaseSensitive:= True, do
the sort and then put it back to the TListBox.  Not difficult but...

On Sat, Dec 1, 2012 at 8:04 PM, Sven Barth <pascaldragon at googlemail.com> wrote:
> On 01.12.2012 18:44, Chavoux Luyt wrote:
>>
>> This is where one would want generics... I am not sure if this is
>> implemented in Object Pascal yet (but it is part of C++ and other
>> languages). I remember it being on the wish list for Delphi for a long
>> time, but don't know if it ever got implemented?
>
>
> FPC has support for generics since around 2006 and has matured since
> (especially in 2.7.1 since I began working on them). Delphi has support for
> generics since Delphi 2009.
>
> For more information about FPC's generics (in 2.6.0) you can take a look
> here: http://www.freepascal.org/docs-html/ref/refch8.html#x91-1010008
>
> You can also look at
> $fpcdir/rtl/objpas/fgl.pas (generic lists and map)
> and
> $fpcdir/packages/fcl-stl/
>
> Regards,
> Sven
>
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



-- 
Shalom,
Avishai
avishai.gore at gmail.com
אבישי גוֹר




More information about the Lazarus mailing list