not saving when using setDidReceiveDataSelector #344

mahy007 opened this Issue Oct 8, 2012 · 0 comments


None yet
1 participant

mahy007 commented Oct 8, 2012

i want to download a file and show the progress bar
i was able to do this.
now , i want to show the progress value in a label and use this code to progress init and update label :

[queue setDelegate:self];
[queue setRequestDidFinishSelector:@selector(updateLabel)];
[queue setDownloadProgressDelegate:progress];
[queue setShowAccurateProgress:YES];

ASIHTTPRequest *request;
request = [ASIHTTPRequest requestWithURL:url];
[request setDelegate:self];

[request setTemporaryFileDownloadPath:[filePath stringByAppendingString:@".download"]];
[request setAllowResumeForFileDownloads:YES];

[request setDidFinishSelector:@selector(updateLabel)];
[request setDidReceiveDataSelector:@selector(updateLabel)];

[request setShouldContinueWhenAppEntersBackground:YES];
[request setShouldAttemptPersistentConnection:NO]; 
[request setDownloadDestinationPath:filePath]; 
[queue addOperation:request];
[queue go];

but not save in the destination path !

and when i clear this code :
[request setDidReceiveDataSelector:@selector(updateLabel)];
saving done !

what is problem ?

i want to update label text when progress value changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment