Re: NSEnumerator doesn't support NSCopying - why?
Re: NSEnumerator doesn't support NSCopying - why?
- Subject: Re: NSEnumerator doesn't support NSCopying - why?
- From: Wade Tregaskis <email@hidden>
- Date: Mon, 16 Feb 2004 22:30:45 +1100
Anyone know why an NSEnumerator (NSIdEnumerator, in this particular
case) can't be copied, and some way to get around this, aside from
the obvious i,j loop?
The double while loop construct above makes no sense to me... I guess
you cut out the reason behind the double loop. I personally would use
a single while loop (avoid scanning NxN[-1?]) and use continue to skip
items and if/else logic for selective processing, etc.
There is no way of doing so.
Anyway what are you trying to do?
Compare each possible pairing of items in the list. It's a very simple
procedure, albeit an inefficient one (not an issue in this case).
Why can't the inner while loop get its own enumerator by calling
objectEnumerator?
Because then I'll end up wasting twice as much time by ending up
checking each pair twice, since you need only check the pairs from one
end, not both.
Wade Tregaskis
-- Sed quis custodiet ipsos custodes?
_______________________________________________
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.