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

Re: Count of enumerator?


  • Subject: Re: Count of enumerator?
  • From: Thilo Ettelt <email@hidden>
  • Date: Thu, 11 May 2006 17:13:33 +0200

Why don't create a remaining objects array yourself using - containsObject:, -subarrayWithRange:?


- Thilo

Am 11.05.2006 um 17:06 schrieb Christopher Hickman:

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

_______________________________________________ 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
References: 
 >Count of enumerator? (From: "Christopher Hickman" <email@hidden>)

  • Prev by Date: Count of enumerator?
  • Next by Date: Re: Count of enumerator?
  • Previous by thread: Count of enumerator?
  • Next by thread: Re: Count of enumerator?
  • Index(es):
    • Date
    • Thread