-NSMutableIndexSet shiftIndexesStartingAtIndex:by: weirdness
-NSMutableIndexSet shiftIndexesStartingAtIndex:by: weirdness
- Subject: -NSMutableIndexSet shiftIndexesStartingAtIndex:by: weirdness
- From: steven Hooley <email@hidden>
- Date: Thu, 17 Sep 2009 14:23:17 +0100
- shiftIndexesStartingAtIndex:by: and
-containsIndexesInRange:NSMakeRange: don't seem to play nicely
together..
Is this expected?
NSMutableIndexSet *someIndexes = [NSMutableIndexSet indexSet];
[someIndexes addIndex:0];
[someIndexes addIndex:2];
[someIndexes shiftIndexesStartingAtIndex:2 by:-1];
BOOL result1 = [someIndexes containsIndex:0];
BOOL result2 = [someIndexes containsIndex:1];
BOOL result3 = [someIndexes containsIndexesInRange:NSMakeRange(0,2)];
NSLog(@"%@ %@ %@", (result1 ? @"YES" : @"NO"), (result2 ? @"YES" :
@"NO"), (result3 ? @"YES" : @"NO") );
-- 2009-09-17 14:21:25.789 otest[19356:10b] YES YES NO
thanks
_______________________________________________
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