On 2 Nov 2009, at 15:05, Alex Kac wrote:
Would this be helpful?
http://www.cimgf.com/2008/02/16/cocoa-tutorial-nsoperation-and-nsoperationqueue/
It shows how to use NSOperationQueue, but it uses downloading HTML
pages as an example.
It isn't really a good example of downloading HTML pages
Would this be helpful?
http://www.cimgf.com/2008/02/16/cocoa-tutorial-nsoperation-and-nsoperationqueue/
It shows how to use NSOperationQueue, but it uses downloading HTML
pages as an example.
On Oct 31, 2009, at 11:19 PM, DKJ wrote:
On 2009-10-31, at 19:34 , Roland King wrote:
. And why ar
On Oct 31, 2009, at 6:50 PM, DKJ wrote:
All of the files have to be downloaded before the app can do
anything. I get the connectionDidFinishLoading delegate method of my
one and only NSURLConnection to call a downloadFinished method at
the end of the synchronous downloads, so the app knows
On Oct 31, 2009, at 11:19 PM, DKJ wrote:
The 2-file example was a simplified case I posted when I was asking
whether the method would work. I actually have half-a-dozen or so
data files to download. (It can vary.)
I'm using the delegate to save the files to disk under different
names, so
> The 2-file example was a simplified case I posted when I was asking whether
> the method would work. I actually have half-a-dozen or so data files to
> download. (It can vary.)
>
>
> Any suggestions about how to do all of this with multiple NSURLConnections
> would be quite welcome. Elegant code
On 2009-10-31, at 19:34 , Roland King wrote:
. And why are you now talking about 4 NSURLConnections when you say
you have 2 files?
The 2-file example was a simplified case I posted when I was asking
whether the method would work. I actually have half-a-dozen or so data
files to download.
that's one way. Or have a boolean for each one which says when it's
been downloaded, or put all the connections in an NSArray or some kind
of dictionary and take each one out as it completes and call your
routine when the NSArray is empty (don't start any of the connections
until they are a
On 2009-10-31, at 19:22 , Roland King wrote:
You can trivially use one delegate to manage both these downloads,
have them happen at the same time and only call downloadFinished
when both of them have finished, or if you have more than 2, all 3,
or 4 or 127 of them.
What would be the best
The trouble? Since you must already have the NSURLRequests then you're
talking about the difference between
[ [ NSURLConnection alloc ] initWithRequest:request delegate:self ]
vs
[ NSURLConnection sendSynchronousRequest:request returningResponse... ]
don't see the extra troub
So you've used the observation that your user interface element is
animating a spin to decide that mixing synchronous and asynchronous
calls is somehow causing things to happen on different threads; you're
programming backwards. Also what you're doing here is making your app
as slow as it c
I'm still not getting this. Why go to the trouble of setting up four
separate NSURLConnections when one will do the job? And at the same
time give me a very simple way to know when all the data is in place?
If the files took a long time to download, I could see it. But these
take less than
On Sat, Oct 31, 2009 at 6:50 PM, DKJ wrote:
> I was worried that having a download connection for each file would make it
> more complicated for the app to know when they were all finished.
Translation: "I don't know how to do it correctly, and therefore fear
it. I want to stick to what I know."
All of the files have to be downloaded before the app can do anything.
I get the connectionDidFinishLoading delegate method of my one and
only NSURLConnection to call a downloadFinished method at the end of
the synchronous downloads, so the app knows everything is in place and
can start pro
The whole point of doing things asynchronously is you don't have to
care about waiting for one thing to do another thing, just set up two
NSURLConnections and start them going at the same time. So unless you
need some information from file 1 before starting on file 2
connection1 = [ [ NSUR
14 matches
Mail list logo