zwaldowski/BlocksKit — Issue #60: NURLConnection
Author: brspurri
Created: 2012-01-12 21:48:48+00:00
State: open

Hi there,

I just pulled the most recent BlocksKit, and I see that NSURLConnection has changed dramatically.
I've made the changes to my code, however, I continuously get errors with failureBlock on the line:
categoryConnection.failureBlock = ^(NSURLConnection *categoryConnection, NSError *error) {

The error I get is:
[NSURLConnection setFailureBlock:]: unrecognized selector sent to instance 0x552f70

My code:

NSURLRequest *categoryRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:businessCategoryRequestUrlString]];
NSURLConnection *categoryConnection = [NSURLConnection connectionWithRequest:categoryRequest];

categoryConnection.failureBlock = ^(NSURLConnection *categoryConnection, NSError *error) {
NSLog(@"Error grabbing category list: %@\n", [error description]);

};

categoryConnection.successBlock = ^(NSURLConnection *connection, NSURLResponse *response, NSData *responseData){
//do stuff
};

[categoryConnection start];

Any ideas? It worked great before the pull, but now...

Many thanks,
Brett