Recent

Author Topic: sort bug for cells with empty ('') string  (Read 1153 times)

wp

  • Hero Member
  • *****
  • Posts: 6017
Re: sort bug for cells with empty ('') string
« Reply #15 on: June 17, 2019, 02:15:13 pm »
Thanks for the patch, and for making it backward compatible. Applied in r7011.

@ithoh: If you need the index of the column currently compared you get it as the ColRowIndex of the TsSortKey parameter passed to the OnFullCompareCells now.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

iteh

  • New Member
  • *
  • Posts: 12
Re: sort bug for cells with empty ('') string
« Reply #16 on: June 17, 2019, 02:58:08 pm »
If you need the index of the column currently compared you get it as the ColRowIndex of the TsSortKey parameter passed to the OnFullCompareCells now.
I initially made a mistake, did not look at the sources, and thought that sorting is going over the Key (from 0 to High(FSortParams.Keys)) and wanted to get it to determine what the Key is now (to understand what part of the sorting was already done and draw a progressbar).

then I looked at the sources - Key changes from 0 to High(FSortParams.Keys) for each comparison of a pair of lines (if sorting by columns) and I don’t need this parameter anymore.