Marxon13 / M13OrderedDictionary

A NSDictionary with ordered objects and keys
263 stars 29 forks source link

filterEntriesUsingPredicateForObjects: fails #16

Closed Thomas101 closed 10 years ago

Thomas101 commented 10 years ago

filterEntriesUsingPredicateForObjects: fails when you remove an item from the dictionary. Comes up with an index of out of range exception. You can get the error yourself by running the following...

    M13MutableOrderedDictionary* d = [[M13MutableOrderedDictionary alloc] init];
    [d addObject:@"a" pairedWithKey:@"a"];
    [d addObject:@"b" pairedWithKey:@"b"];
    [d addObject:@"c" pairedWithKey:@"c"];

    NSPredicate* p = [NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) {
        return NO;
    }];
    [d filterEntriesUsingPredicateForObjects:p];

Thanks! (: