diff --git a/iPad/AppDelegate_iPad.m b/iPad/AppDelegate_iPad.m index 0e15cce..3bb7b8c 100644 --- a/iPad/AppDelegate_iPad.m +++ b/iPad/AppDelegate_iPad.m @@ -17,7 +17,7 @@ @implementation AppDelegate_iPad #pragma mark - #pragma mark Application lifecycle -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. ACSugarSyncClient* client = [ACSugarSyncClient clientWithUsername:@"jkichline@gmail.com" password:@"spoon!08" accessKey:@"MTY0OTE1ODEzMTM1MzU1NTYxNjg" privateAccessKey:@"MmFhYzljN2RlOGQ0NDA5YWE1NDNlYTA0Yzk2MDk5N2Q"]; @@ -52,8 +52,8 @@ -(void)test:(id)value { ACSugarSyncFile* file = (ACSugarSyncFile*)item; NSLog(@"File: %@ - %d bytes", file, file.size); if(file.size > 0) { -// [file downloadFile]; -// break; + // [file downloadFile]; + // break; } } } diff --git a/src/ACWebDAV/Requests/ACWebDAVMoveRequest.m b/src/ACWebDAV/Requests/ACWebDAVMoveRequest.m index 5bddb59..211705e 100644 --- a/src/ACWebDAV/Requests/ACWebDAVMoveRequest.m +++ b/src/ACWebDAV/Requests/ACWebDAVMoveRequest.m @@ -62,19 +62,18 @@ -(void)connection:(NSURLConnection *)connection didReceiveAuthenticationChalleng - (void)connection:(NSURLConnection*)connection didReceiveResponse:(NSHTTPURLResponse*)response { if([response statusCode] == 201) { - if(self.delegate != nil && [(NSObject*)self.delegate respondsToSelector:@selector(ACWebDAVMoveRequest:didMoveItem:)]) { + if(self.delegate != nil && [(NSObject*)self.delegate respondsToSelector:@selector(request:didMoveItem:)]) { ACWebDAVLocation* newLocation = [ACWebDAVLocation locationWithURL:[response URL] username:self.location.username password:self.location.password]; ACWebDAVItem* item = [[ACWebDAVItem alloc] initWithLocation:newLocation]; [self.delegate request:self didMoveItem:item]; [item release]; } } else { - if(self.delegate != nil && [(NSObject*)self.delegate respondsToSelector:@selector(ACWebDAVMoveRequest:didFailWithErrorCode:)]) { + if(self.delegate != nil && [(NSObject*)self.delegate respondsToSelector:@selector(request:didFailWithErrorCode:)]) { [self.delegate request:self didFailWithErrorCode:[response statusCode]]; } } } - -(void)connectionDidFinishLoading:(NSURLConnection *)connection { [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; [connection release]; @@ -82,7 +81,7 @@ -(void)connectionDidFinishLoading:(NSURLConnection *)connection { -(void)connection:(NSURLConnection*)connection didFailWithError:(NSError*)error { [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; - if(self.delegate != nil && [(NSObject*)self.delegate respondsToSelector:@selector(ACWebDAVMoveRequest:didFailWithError:)]) { + if(self.delegate != nil && [(NSObject*)self.delegate respondsToSelector:@selector(request:didFailWithError:)]) { [self.delegate request:self didFailWithError:error]; } [connection release]; diff --git a/src/ACWebDAV/Requests/ACWebDAVPropertyRequest.m b/src/ACWebDAV/Requests/ACWebDAVPropertyRequest.m index ed7999d..0467958 100644 --- a/src/ACWebDAV/Requests/ACWebDAVPropertyRequest.m +++ b/src/ACWebDAV/Requests/ACWebDAVPropertyRequest.m @@ -244,6 +244,10 @@ -(void)connectionDidFinishLoading:(NSURLConnection *)connection { -(void)connection:(NSURLConnection*)connection didFailWithError:(NSError*)error { [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; + if(self.delegate != nil && [(NSObject*)self.delegate respondsToSelector:@selector(request:didFailWithError:)]) { + [self.delegate request:self didFailWithError:error]; + } + [connection release]; }