NSIndexSet incomplete?
NSIndexSet incomplete?
- Subject: NSIndexSet incomplete?
- From: Arthur C. <email@hidden>
- Date: Mon, 6 Aug 2007 19:45:41 +0200
- Importance: Normal
Hello,
The NSIndexSet class reference shows that a collection of integers is stored as a set of ranges (NSRange). I wonder why the ranges cannot be extracted directly from an indexset, as the other way round is possible, i.e. initializing an index set with an NSRange can be done.
I'm trying to find an efficient way to determine whether the index set is contiguous. If it is, it consists of 1 range. Now it seems I have to cycle through all stored indexes to see whether there is a gap larger than 1 in between. That's disappointing, given the construction of the NSIndexSet.
Besides, using F-script I did find a method called rangeAtIndex, giving the i-th NSRange, but it won't work in my code (although it does work in the debugger window...).
So, this may be something for an enhancement request, or did I miss something?
Best regards,
Arthur C.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden