Here's the code:
-(void)setProjectID:(NSString *)newProject {
[self willChangeValueForKey:@"projectID"];
[projectID release];
projectID = [newProject copy];
[self didChangeValueForKey:@"projectID"];
// Since we have an ID, now we need to load it
NSInvocation *returnInvocation = [NSInvocation invocationWithMethodSignature:
[Detail instanceMethodSignatureForSelector:@selector(configureView:)]];
[returnInvocation setTarget:self];
[returnInvocation performSelector:@selector(displayAlert) withObject:nil afterDelay:0.5];
[returnInvocation setSelector:@selector(configureView:)];
[returnInvocation retainArguments];
fetch = [[WBWDocumentFetcher alloc] init];
[fetch retrieveDocument:[NSURL wb_URLForTabType:PROJECT_DETAILS inProject:projectID] returnBy:returnInvocation];
}
-(void)displayAlert
{
UIAlertView * alert = [[UIAlertView alloc]
initWithTitle:@"Connection Error"
message:@"Error loading Data."
delegate:self cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
}
The app is crashing saying NSInvalidArguementException. -[NSInvocation displayAlert]: unrecognized selector sent to instance 0x5842320 Please help!!!