Skip to content

Commit

Permalink
honor the return value of import<attribute> methods
Browse files Browse the repository at this point in the history
import callbacks must return a BOOL indicating whether they have handled the import themselves (YES) or whether MR still needs to handle it (NO). the default is YES for backwards compatibility.
  • Loading branch information
Evan Flath committed Jan 9, 2014
1 parent eb72053 commit 616e53a
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -42,8 +42,12 @@ - (BOOL) MR_importValue:(id)value forKey:(NSString *)key
[invocation setSelector:selector];
[invocation setArgument:&value atIndex:2];
[invocation invoke];
// [self performSelector:selector withObject:value];
return YES;
// import callbacks must return a BOOL indicating whether they have
// handled the import themselves (YES) or whether MR still needs to handle it (NO).
// the default is YES for backwards compatibility.
BOOL returnValue = YES;
[invocation getReturnValue:&returnValue];
return returnValue;
}
return NO;
}
Expand Down

0 comments on commit 616e53a

Please sign in to comment.