• 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: I can't figure out how to use NSIndexSet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I can't figure out how to use NSIndexSet


  • Subject: Re: I can't figure out how to use NSIndexSet
  • From: Keith Renz <email@hidden>
  • Date: Thu, 20 Nov 2003 21:58:34 -0500

Bill,

It appears NSIndexSet provides for both ways of getting the indices, one at a time -- you can pick an index (which may or may not be in the set) and start walking either way -- or en-masse. I am currently using the en-masse method like you described for table selection mechanics with excellent results. If you're going to iterate through a lot of indexes, it sure seems more efficient to load them all into a buffer and increment a pointer than invoke a method for each iteration. So, I would suggest that Scott add sample code for both methods. NSIndexSet.h also provides a very short explanation.

Keith

-----

On Nov 20, 2003, at 6:49 PM, Bill Cheeseman wrote:

on 2003-11-20 4:37 PM, Scott Anguish at email@hidden wrote:

while (currentIndex = != NSNotFound) {

I'll have to break out my Kernighan & Ritchie on that syntax! :-)

Seriously, how does this fit into what I was doing, as described in my post
just now? Do your very Cocoa-like iteration skeletons automatically handle
all the very C-like buffer declarations and calls to
getIndexes:maxCount:inIndexRange: in my code?

Or do your iteration skeletons assume some user setup that you didn't
describe?

Is my code all wet, or is it a good way to approach speed optimization for
large index sets?

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: I can't figure out how to use NSIndexSet (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: Wrapping in a Matrix
  • Next by Date: Re: SearchKit vs. Lucene
  • Previous by thread: Re: I can't figure out how to use NSIndexSet
  • Next by thread: Re: I can't figure out how to use NSIndexSet
  • Index(es):
    • Date
    • Thread