Re: NSMatrix selections
Re: NSMatrix selections
- Subject: Re: NSMatrix selections
- From: Tom Waters <email@hidden>
- Date: Fri, 8 Jun 2001 19:18:25 -0700
I could be wrong, but I think that if you call selectCellAtRow:column:
on say three rows in series, only the last one ends up selected. At
least this has been the case in my testing of NSBrowser... because if
you select a branch node, it opens up a new column...
On Friday, June 8, 2001, at 03:55 PM, David P Henderson wrote:
On Friday, June 8, 2001, at 03:52 , Tom Waters wrote:
I've been digging deeper into NSBrowser and have my own NSMatrix
subclass in use to support drag and drop, etc.
I note that NSMatrix also doesn't have a method for making
discontinuous selections, even though the user can make them through
the interface.
NSMatrix adds setSelectionFrom:to:anchor:highlight: which allows for
multiple selection, but I'm assuming that selectCellAtRow:column
selects only a single cell, as that is the behavior that NSBrowser
shows.
I must be missing something obvious.
If you are trying to find out which cells the user has selected, use
-selectedCells which returns an array of the selected cells; then, work
with the cells in the array. Otherwise send -selectCellAtRow:column: or
-selectCellWithTag: for each cell you want selected.