Edmund
Edmund

Reputation: 31

Deselecting cells programmatically in NSMatrix does not work

I want to be able to deselect all the cells in an NSMatrix from my program.
I am using deSelectAllCells but it does not work correctly. It always leaves at least one cell selected.

More specifically I have tried all possible settings of mode which appear to have no effect. I have also tried setting allowsEmptySelection to YES with no effect. I am using mouseDown, mouseUp and mouseDragged to control how selection works, and allow the user to select a cell, row or column. Combinations are also allowed with the command key.

Once a selection is made the user chooses an action from a separate window. When the window is clicked the last selection goes gray, and after deSelectAllCells is called within the action all the selections are removed except for the gray one. If the matrix window is now clicked the gray selection returns to the default selection colour. Even with just a single selection the same behaviour occurs.

Upvotes: 3

Views: 321

Answers (0)

Related Questions