У меня следующий код:
+ (NSMutableArray*)getTodayData:(NSDate*)today
{
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/ichrono/20110715/60b88126/load_dr_daily_schedule/%@/", [self getDrChronoHost], [dateFormat stringFromDate:today]]];
ASIFormDataRequest *request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease];
[self addCurrentUserLoginToPostRequest:request];
[request setPostValue:[dateFormat stringFromDate:today] forKey:@"target_date"];
[request setDownloadCache:[ASIDownloadCache sharedCache]];
[request startSynchronous];
NSError *error = [request error];
NSString *responseString;
if (!error) {
responseString = [request responseString];
} else {
return NULL;
}
return [responseString JSONValue];
}
}
До того, как я добавил строку, все работало нормально [request setDownloadCache:[ASIDownloadCache sharedCache]];
.
Как я получаю сообщение об ошибке:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ASIFormDataRequest setDownloadCache:]: unrecognized selector sent to instance 0x9a0140'