mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-03 09:45:10 +08:00
Added NSAssert statements to try and prevent accidental configuration of a Three20 model with an object loader that has already been sent.
This commit is contained in:
@@ -58,7 +58,8 @@ static NSString* const kDefaultLoadedTimeKey = @"RKRequestTTModelDefaultLoadedTi
|
||||
- (id)initWithObjectLoader:(RKObjectLoader*)objectLoader {
|
||||
self = [self init];
|
||||
if (self) {
|
||||
// TODO: When allowing mutation of object loader, be sure to update...
|
||||
NSAssert(_objectLoader.isLoading == NO, @"Cannot use an object loader that is being sent");
|
||||
NSAssert(_objectLoader.isLoaded == NO, @"Cannot use an object loader that is already loaded");
|
||||
_objectLoader = [objectLoader retain];
|
||||
_objectLoader.delegate = self;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user