[fpc-devel] Questions on TStringList.Find change (Mantis 28744)
David Jenkins
david at scootersoftware.com
Tue Mar 29 23:48:03 CEST 2016
On 3/26/16 4:19 AM, Michael Van Canneyt wrote:
>
> I have implemented a new property
>
> TStringsSortStyle = (sslNone,sslUser,sslAuto);
>
> Property SortStyle : TStringsSortStyle Read FSortStyle Write
> SetSortStyle;
>
> I assume the meaning is clear.
>
> - Sorted is true if SortStyle is in [sslUser,sslAuto], so it reflects
> actual state.
>
> - Setting sorted to True is equivalent to setting SortStyle = sslAuto
>
> - Setting sorted to false is equivalent to setting SortStyle = sslNone
>
> - Find will work on one of those values, but it will raise an
> exception if sortstyle = sslnone
>
> - Add will put a new string on the 'correct' place if SortStyle=sslAuto
>
> - Insert will raise an error (as it was) if SortStyle=sslAuto.
>
> Michael.
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Michael,
I have checked out this code and imported it into our code base. It
works great. Thank you very much. In addition the work of searching
through our code and making sure we are setting SortStyle correctly has
uncovered a bug in our usage. So additional thanks :D
David Jenkins
More information about the fpc-devel
mailing list