정말 도움이 필요합니다. 나는이 시점에서 필사적이다.NSOperationQueue 내의 NSOperation이 실행되지 않습니다.
NSOperationQueue에 추가 될 때 트리거되지 않는 NSOperation이 있습니다. 나는 NSOperation 상태를 확인하기 위해 몇 가지 로깅을 추가하고이 결과 :
Queue operations count = 1
Queue isSuspended = 0
Operation isCancelled? = 0
Operation isConcurrent? = 0
Operation isFinished? = 0
Operation isExecuted? = 0
Operation isReady? = 1
Operation dependencies? = 0
코드는 매우 간단합니다. 특별한 것은 없습니다.
LoadingConflictEvents_iPad *loadingEvents = [[LoadingConflictEvents_iPad alloc] initWithNibName:@"LoadingConflictEvents_iPad" bundle:[NSBundle mainBundle]];
loadingEvents.modalPresentationStyle = UIModalPresentationFormSheet;
loadingEvents.conflictOpDelegate = self;
[self presentModalViewController:loadingEvents animated:NO];
[loadingEvents release];
ConflictEventOperation *operation = [[ConflictEventOperation alloc] initWithParameters:wiLr.formNumber pWI_ID:wiLr.wi_id];
[queue addOperation:operation];
NSLog(@"Queue operations count = %d",[queue operationCount]);
NSLog(@"Queue isSuspended = %d",[queue isSuspended]);
NSLog(@"Operation isCancelled? = %d",[operation isCancelled]);
NSLog(@"Operation isConcurrent? = %d",[operation isConcurrent]);
NSLog(@"Operation isFinished? = %d",[operation isFinished]);
NSLog(@"Operation isExecuted? = %d",[operation isExecuting]);
NSLog(@"Operation isReady? = %d",[operation isReady]);
NSLog(@"Operation dependencies? = %d",[[operation dependencies] count]);
[operation release];
이제 내 작업은 메인 메서드에서 많은 일을하지만 문제는 결코 호출되지 않습니다. 메인은 실행되지 않습니다. 가장 이상한 것 (나를 믿어 라. 나는 아직 미치지 않았다.). NSLog 라인에 중단 점을 넣거나 작업을 만들면 main 메서드가 호출되고 모든 것이 완벽하게 작동합니다.
오랫동안 정상적으로 작동했습니다. 나는 최근에 약간의 변화를 일으켰으며 분명히 뭔가를 망쳐 놓았다. 그 중 하나가 iOS 5.1 SDK (iPad)로 업그레이드하는 것입니다.
뭔가 추가하려면 동일한 NSOperation 개체를 사용하는이 응용 프로그램의 iPhone (iOS 5.1) 버전이 있어야합니다. 차이는 UI에서만 발생하며 모든 것이 정상적으로 작동합니다.
아, 실제 장치에서만 오류가 발생합니다. 시뮬레이터에서 모든 것이 정상적으로 작동합니다.
도움이 될 것입니다. 작업이 동시 경우
감사합니다,
그것은 계몽적인 디버깅 세션 이었음에 틀림 없습니다. 나를 위해, 그것은했다. –
그래서 .... 우리는 매 시간마다 수면을해야합니까? 나는 그것을 얻지 않는다. –