>Do you know of a way to avoid my triple for loop in SS.selectCell() and
>not re-highlight the cells that have already been highlighted with each
>successive mouse click? Is there a more efficient way of handling this
>case instead of my inefficient approach right now which is:
Actually, as far as SpreadSheet.selectCell is concerned, I suggest
just eliminating my double for loop, in preference to a single
setSelected call on the appropriate cell.
That is, the entire purpose of my double for loop was to *deselect*
the old selected cell. And yes, it's an inefficient implementation,
but I wasn't worried because even with 100 spreadsheet cells it's
still plenty fast enough.
Of course, you'll then need to add some sort of logic for deselecting
cells that are clicked, but already selected. Perhaps add a
FancySSCell.isSelected method, then call it from SpreadSheet.selectCell
to determine whether to select or deselect the newly clicked cell.