Re: Showing activity indicator during data download
Re: Showing activity indicator during data download
- Subject: Re: Showing activity indicator during data download
- From: DKJ <email@hidden>
- Date: Thu, 29 Oct 2009 09:40:25 -0700
On 2009-10-29, at 9:00 , Alastair Houghton wrote:
it's going to be easiest just to use the asynchronous
NSURLConnection approach.
I did implement this, and got it to work. But some of the files I'm
downloading are XML data that needs to be parsed. And the parser can't
start until the file download is complete, which is what made the
synchronous download so appealing.
Since non-XML files are also being downloaded, I can't simply initiate
the XML parsing from the connectionDidFinishLoading delegate method.
But I could have that method set a flag, and hold off the parsing
until the flag is set.
So how to start the parsing? The following seems rather amateurish:
while( !downloadFinished )
[self amuseTheUser];
[self startParsing];
I suspect there's a better way.
dkj
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden