[Lazarus] Lazarus support for Sorting is completely inadequate.
Avishai
avishai.gore at gmail.com
Tue Dec 4 14:26:28 CET 2012
My interest is that there be a Sort method that is "Langauge aware"
and that it Not be driven by Locale. Letting Locale set a default
sort method makes sense, but you should be able to override that
default. As for CaseSensitive Sort, I have tried and failed to think
of a situation where I wouldn't want a CaseSensitive Sort, assuming
the Language has Case (Hebrew does not). It should also have
"Property SortAscending: Boolean = True".
For me the only real issue is collecting the proper Sort methods
(compare functions) for the different languages and constructing a
wrapper to implement them. With the help of the Lazarus community, I
don't think that should be difficult.
On Tue, Dec 4, 2012 at 12:53 PM, Bart <bartjunk64 at gmail.com> wrote:
> On 12/1/12, Avishai <avishai.gore at gmail.com> wrote:
>
>> Lazarus support for Sorting is completely inadequate. ....
>
> At the risk of repeating myself or someone else:
>
> Every component that has a (string-based) sorting routine might also
> have a CustomSort like:
>
> TBasicComponent.CustomSort(const CompareFunc: TCompareFunc);
> where
> type
> TCompareFunc = function(Item1, Item2: Pointer): Integer;
>
> Or perhaps a property of type TCompareFunc that controls the default
> sort routine?
>
> The challenge (for Avishai's point of view) would then be to supply
> appropriate compare functions for different languages and situations.
> The compare function also solves the "do i want case-sensitivity" issue.
>
> Just my 2 cents...
>
> Bart
>
> --
> _______________________________________________
> 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