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@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
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel