Skip to content

Commit

Permalink
Fix typos in variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry-Me committed Oct 18, 2016
1 parent 28bf854 commit 4ffda07
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions iOS/OcrSdkDemo/Sources/Client.m
Expand Up @@ -68,7 +68,7 @@ - (void)uploadFinished:(HTTPOperation*)operation
[self.delegate clientDidFinishUpload:self];
}

Task* task = [[Task alloc] initWithData:operation.recievedData];
Task* task = [[Task alloc] initWithData:operation.receivedData];

NSParameterAssert(task);
NSParameterAssert(task.ID);
Expand All @@ -95,7 +95,7 @@ - (void)processingFinished:(HTTPOperation*)operation
[self.delegate client:self didFailedWithError:operation.error];
}
} else {
Task* task = [[Task alloc] initWithData:operation.recievedData];
Task* task = [[Task alloc] initWithData:operation.receivedData];

if ([self.delegate respondsToSelector:@selector(clientDidFinishProcessing:)]) {
[self.delegate clientDidFinishProcessing:self];
Expand All @@ -121,7 +121,7 @@ - (void)downloadFinished:(HTTPOperation*)operation
[self.delegate client:self didFailedWithError:operation.error];
}
} else if ([self.delegate respondsToSelector:@selector(client:didFinishDownloadData:)]) {
[self.delegate client:self didFinishDownloadData:operation.recievedData];
[self.delegate client:self didFinishDownloadData:operation.receivedData];
}
}

Expand Down
6 changes: 3 additions & 3 deletions iOS/OcrSdkDemo/Sources/HTTPOperation.h
Expand Up @@ -5,16 +5,16 @@
@interface HTTPOperation : NSObject<NSURLConnectionDelegate, NSURLConnectionDataDelegate> {
id _target;
SEL _action;
NSThread* _targetTherad;
NSMutableData* _recievedData;
NSThread* _targetThread;
NSMutableData* _receivedData;

NSURLConnection* _connection;

BOOL _canceled;
}

@property (strong) NSURLRequest* request;
@property (strong, readonly) NSData* recievedData;
@property (strong, readonly) NSData* receivedData;
@property (strong, readonly) NSError* error;

@property (readonly) BOOL isCanceled;
Expand Down
12 changes: 6 additions & 6 deletions iOS/OcrSdkDemo/Sources/HTTPOperation.m
Expand Up @@ -3,7 +3,7 @@
@implementation HTTPOperation

@synthesize request = _request;
@synthesize recievedData = _recievedData;
@synthesize receivedData = _receivedData;
@synthesize error = _error;

@synthesize isCanceled = _canceled;
Expand All @@ -18,12 +18,12 @@ - (id)initWithRequest:(NSURLRequest*)request target:(id)target finishedAction:(S
self.request = request;

_target = target;
_targetTherad = [NSThread currentThread];
_targetThread = [NSThread currentThread];

_action = action;


_recievedData = [NSMutableData data];
_receivedData = [NSMutableData data];
}

return self;
Expand Down Expand Up @@ -53,7 +53,7 @@ - (void)finishWithError:(NSError*)error
_error = error;

if (!self.isCanceled) {
[_target performSelector:_action onThread:_targetTherad withObject:self waitUntilDone:NO];
[_target performSelector:_action onThread:_targetThread withObject:self waitUntilDone:NO];
}
}

Expand Down Expand Up @@ -90,12 +90,12 @@ - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)err

- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
[_recievedData setLength:0];
[_receivedData setLength:0];
}

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
[_recievedData appendData:data];
[_receivedData appendData:data];
}

- (void)connectionDidFinishLoading:(NSURLConnection *)connection
Expand Down
2 changes: 1 addition & 1 deletion iOS/OcrSdkDemo/Sources/ProcessingOperation.m
Expand Up @@ -6,7 +6,7 @@ @implementation ProcessingOperation
- (void)finishWithError:(NSError*)error
{
if (error == nil) {
Task* task = [[Task alloc] initWithData:self.recievedData];
Task* task = [[Task alloc] initWithData:self.receivedData];

if ([task isActive]) {
NSLog(@"Waiting for image processing complete...");
Expand Down

0 comments on commit 4ffda07

Please sign in to comment.