Reworked notifications for consistency with Cocoa idioms. Simplified code paths through the queue. Tweaked the logging for easier info at the Debug level without having to drop down to Trace.

This commit is contained in:
Blake Watters
2011-06-29 16:18:18 -04:00
parent 853704b2fd
commit 5a2f937a52
6 changed files with 68 additions and 69 deletions

View File

@@ -69,11 +69,13 @@
if (successful) {
_isLoaded = YES;
[[NSNotificationCenter defaultCenter] postNotificationName:RKRequestReceivedResponseNotification
object:self
userInfo:nil];
NSDictionary* userInfo = [NSDictionary dictionaryWithObject:_response
forKey:RKRequestDidLoadResponseNotificationUserInfoResponseKey];
[[NSNotificationCenter defaultCenter] postNotificationName:RKRequestDidLoadResponseNotification
object:self
userInfo:userInfo];
} else {
[[NSNotificationCenter defaultCenter] postNotificationName:RKRequestFailedWithErrorNotification
[[NSNotificationCenter defaultCenter] postNotificationName:RKRequestDidFailWithErrorNotification
object:self
userInfo:nil];
}