• 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
NSIndexSet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSIndexSet


  • Subject: NSIndexSet
  • From: David Blanton <email@hidden>
  • Date: Fri, 21 Nov 2008 08:44:01 -0700


How would one construct an NSIndexSet containing the indices 2,4,5 ?

I did:

	NSRange two = NSMakeRange(2, 1);
	NSRange four = NSMakeRange(4, 1);
	NSRange five = NSMakeRange(5, 1);
	NSRange u1 = NSUnionRange(two,four);
	NSRange u2 = NSUnionRange(u1,five);
	id indices = [NSIndexSet indexSetWithIndexesInRange:u2];
But, of course, NSUnionRange adds 3 so indices becomes 2,3,4,5.

Or, should one even use NSIndexSet?




_______________________________________________

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


  • Follow-Ups:
    • Re: NSIndexSet
      • From: Randall Meadows <email@hidden>
    • Re: NSIndexSet
      • From: Greg Titus <email@hidden>
    • Re: NSIndexSet
      • From: "Michael Ash" <email@hidden>
    • Re: NSIndexSet
      • From: Jean-Daniel Dupas <email@hidden>
    • Re: NSIndexSet
      • From: Nick Zitzmann <email@hidden>
References: 
 >GetApplicationTextEncoding & "carbon free" (From: spsaxena <email@hidden>)
 >Re: GetApplicationTextEncoding & "carbon free" (From: "Michael Ash" <email@hidden>)

  • Prev by Date: Re: BOOL value in Dictionary
  • Next by Date: Re: Autorelease Question
  • Previous by thread: Re: GetApplicationTextEncoding & "carbon free"
  • Next by thread: Re: NSIndexSet
  • Index(es):
    • Date
    • Thread