• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSIndex with discontinuous values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSIndex with discontinuous values


  • Subject: Re: NSIndex with discontinuous values
  • From: "Clark Cox" <email@hidden>
  • Date: Thu, 22 Nov 2007 07:26:22 -0800

On Nov 22, 2007 2:26 AM, Lorenzo <email@hidden> 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@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSIndex with discontinuous values (From: Lorenzo <email@hidden>)

  • Prev by Date: Re: Strange Undo action for caching based on transient properties
  • Next by Date: Re: Adding and removing application to the dock programmatically.
  • Previous by thread: Re: NSIndex with discontinuous values
  • Next by thread: Using "Cocoa Programming for Mac OS X" with Xcode 3.0
  • Index(es):
    • Date
    • Thread