FTSelectionStrategy>>toggleRowIndex: logic duplication
In FTSelectionStrategy>>toggleRowIndex: there is a code: ((self table selectedRowIndexes includes: rowIndex) and: [ self table selectedRowIndexes size = 1 "just one selected" and: [ self table allowsDeselection ] ]) ifTrue: [ self table allowsDeselection ifTrue: [ self table selectRowIndexes: #() ] ] if first set of expressions is evaluated to true, then "self table allowsDeselectionâ returns true. Why do we check it again in the ifTrue: block? Uko
On 10 Sep 2015, at 11:53, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
In FTSelectionStrategy>>toggleRowIndex: there is a code:
((self table selectedRowIndexes includes: rowIndex) and: [ self table selectedRowIndexes size = 1 "just one selected" and: [ self table allowsDeselection ] ]) ifTrue: [ self table allowsDeselection ifTrue: [ self table selectRowIndexes: #() ] ]
if first set of expressions is evaluated to true, then "self table allowsDeselectionâ returns true. Why do we check it again in the ifTrue: block?
there *was* a reason I think, but most probably is a refactor remaining :) again feel free to submit an issue and to provide a fix :) Esteban ps: Thank you very much for taking a look at fast table. As I said when we integrated it: it is not finished and we count on you to submit the issues that emerge (and of course, if you are âin the moodâ, to provide fixes :P)
Uko
participants (2)
-
Esteban Lorenzano -
Yuriy Tymchuk