Skip navigation.
 
mlRe: NSIndex with discontinuous values
FROM : Clark Cox
DATE : Thu Nov 22 16:26:22 2007

On Nov 22, 2007 2:26 AM, Lorenzo <<email_removed>> wrote:
> I need to select, in one shot only, some rows of my table view with
>
>    [tV selectRowIndexes:indexSet byExtendingSelection:NO];
>
> The rows are discontinuous, as 1, 4, 6, 7, 14, 23...
> So I have to create a discontinuous NSIndexSet. I can't see any way to do
> that. Have you any idea?


NSMutableIndexSet *indexSet = [NSMutableIndexSet indexSet];
[indexSet addIndex: 1];
[indexSet addIndex: 4];
[indexSet addIndex: 6];
[indexSet addIndex: ...];
etc.

--
Clark S. Cox III
<email_removed>

Related mailsAuthorDate
mlNSIndex with discontinuous values Lorenzo Nov 22, 11:26
mlRe: NSIndex with discontinuous values Alastair Houghton Nov 22, 11:29
mlRe: NSIndex with discontinuous values Clark Cox Nov 22, 16:26