iphone - ASIHTTPRequest: Receive delegates from several requests within a network queue -


I use ASINetworkQueue to send two requests, which are in queue. My problem is that when a request Fails / fails to receive notifications.

Code:

  [networkQueue cancelAllOperations]; [NetworkQU set showoutcure progress: yes]; [NetworkCastuploadProgress Progressiveness: Self. Progress Indicator]; [Network qi set deliaget: self]; [NetworkQueue Setquudedfishfish selector: @Selector (QEDDuff)]; NSURL * urlAttachment = [NSURL URLWithString: @ "http: //localhost/test1.xml"]]; ASIFormDataRequest * requestFile = [[ASIFormDataRequest alloc] initWithURL: urlAttachment] autorelease]; [RequestFile setFile: filePath forKey: @ "Attachments [Test]"]; [RequestFile SetDifffileTracker: @Selector (test1WentWrong)]; [RequestFile SetDefinitionsSchell: @Selector (test1done)]; [NetworkCover add operation: request file]; // queue is an NSOperationQueue NSURL * url = [NSURL URLWithString: @ "http: //localhost/test2.xml"]]; ASIFormDataRequest * Request = [[[ASIFormDataRequest alloc] initWithURL: url] autorelease]; [Request Setpost Value: test.filename forKey: @ "Filename [Test]"]; [Requested SetifFile Selector: @Selector (Test2Ventwong)]; [Request SetfishChill: @Selector (Test 2 Dawn)]; [NetworkCover add operation: request]; // queue is a NSOperationQueue [Network Queue];  

test1WentWrong, test1Done, test2WentWrong, test2 call has not been made. Although the request is running fine and queueDidFinish is called.

You need to set a representative for individual requests instead of queue.

Actually, if you had set a finishing and duffel, the selector on the line, the queue representative is called. If you set them on request, the representative of the request is called (both of you, in which case both are called).

In your case, where you want to use the same representative for both requests, but different selectors for DidFail / DidFinish, I can see that for Qi's representative, it will be said that if you If this request has not been created for a representative then it will mean. Maybe I should add it ...)

Ben


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -