0
我在Lib xml解析器中遇到了一個問題。Lib xml委託選擇器不起作用
在端文檔下面的代碼是在這裏
-(void)endDocument
{
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:@"Failed with 404 or 500"
forKey:@"error_message"];
NSError *error = [NSError errorWithDomain:@"ParsingDomain"
code:500
userInfo:userInfo];
SEL selector = @selector(parse:encounteredError: forId: forObj:);
NSMethodSignature *sig = [(id)self.delegate methodSignatureForSelector:selector];
if(nil != sig && [self.delegate respondsToSelector:selector]) // this codition is failed
{
printf("\n In the selector invocation");
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig];
[invocation retainArguments];
[invocation setTarget:self.delegate];
[invocation setSelector:selector];
[invocation setArgument:&self atIndex:2];
[invocation setArgument:&error atIndex:3];
[invocation setArgument:&Id atIndex:4];
[invocation setArgument:&obj atIndex:5];
[invocation performSelectorOnMainThread:@selector(invoke) withObject:NULL waitUntilDone:NO];
}
}
我在上面的代碼中出現故障的情況評價。
謝謝, Madan mohan。