Count of enumerator?
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