Changeset 384
- Timestamp:
- 06/07/09 11:28:14 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
apps/iphone/superbook/trunk/Classes/NaptrViewController.m
r382 r384 35 35 36 36 - (void)decrementLoadingCount; 37 37 - (void)showError:(NSError *)error; 38 38 @end 39 39 … … 480 480 [self.theTable performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:YES]; 481 481 if (error) { 482 UIAlertView *errAlert = [[UIAlertView alloc] initWithTitle:@"Error" 483 message:[error localizedDescription] 484 delegate:nil cancelButtonTitle:@"OK" 485 otherButtonTitles:nil]; 486 [errAlert show]; 487 [errAlert release]; 482 [self showError:error]; 488 483 } 489 484 } … … 647 642 } 648 643 644 #pragma mark ------ Error Methods 645 646 - (void)showError:(NSError *)error { 647 if (![NSThread isMainThread]) { 648 [self performSelectorOnMainThread:@selector(showError:) 649 withObject:error 650 waitUntilDone:NO]; 651 return; 652 } 653 UIAlertView *errAlert = [[UIAlertView alloc] initWithTitle:@"Error" 654 message:[error localizedDescription] 655 delegate:nil cancelButtonTitle:@"OK" 656 otherButtonTitles:nil]; 657 [errAlert show]; 658 [errAlert release]; 659 } 649 660 @end 650 661








