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