• 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
Count of enumerator?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Count of enumerator?


  • Subject: Count of enumerator?
  • From: "Christopher Hickman" <email@hidden>
  • Date: Thu, 11 May 2006 11:06:59 -0400

Is it possible to get a count of an enumerator without exhausting it?  I
just want to know how many objects remain in my enumerator, but calling
allObjects to get a count exhausts it.  I can work around by doing some
silly things like creating a new enumerator from the array returned by
allObjects after counting it, but it seems like there should be a simpler
way. (Plus, I lose functionality from that since -[NSArray objectEnumerator]
returns an NSEnumerator and I'm starting with an NSDirectoryEnumerator.

I guess I might just have to file an enhancement request against Foundation
to add -[NSEnumerator count], but I'm hoping there's just something I'm
missing.

Topher
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Count of enumerator?
      • From: Ryan Britton <email@hidden>
    • Re: Count of enumerator?
      • From: John Stiles <email@hidden>
    • Re: Count of enumerator?
      • From: Thilo Ettelt <email@hidden>
  • Prev by Date: NSDrawer in System Pref Pane
  • Next by Date: Re: Count of enumerator?
  • Previous by thread: Re: NSDrawer in System Pref Pane
  • Next by thread: Re: Count of enumerator?
  • Index(es):
    • Date
    • Thread