• 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: My new framwork
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: My new framwork


  • Subject: Re: My new framwork
  • From: Allan Odgaard <email@hidden>
  • Date: Wed, 3 Mar 2004 23:09:35 +0100

On 3. Mar 2004, at 22:49, mmalcolm crawford wrote:

I am really puzzled that Apple does not provide a way to easily iterate objects instantiated from this class...
This seems straightforward enough:
Forwards:
unsigned currentIndex = [indexSet firstIndex];
while (currentIndex != NSNotFound)
{
//...
currentIndex = [indexSet indexGreaterThanIndex:currentIndex];
}

I should have added efficiently. I doubt that indexGreaterThanIndex: is O(1) and thus a bad idea for iterating large index sets, which is also hinted by the documentation for getIndexes:maxCount:inIndexRange:, which says: "Use this method to quickly and efficiently traverse an index set".
_______________________________________________
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.


  • Follow-Ups:
    • Iterating NSSet (was Re: My new framwork)
      • From: mmalcolm crawford <email@hidden>
References: 
 >My new framwork (From: April Gendill <email@hidden>)
 >Re: My new framwork (From: John Randolph <email@hidden>)
 >Re: My new framwork (From: Allan Odgaard <email@hidden>)
 >Re: My new framwork (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: Compression...
  • Next by Date: resetCursorRects and non-Key palette windows
  • Previous by thread: Re: My new framwork
  • Next by thread: Iterating NSSet (was Re: My new framwork)
  • Index(es):
    • Date
    • Thread