• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Showing activity indicator during data download
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Showing activity indicator during data download
      • From: Jens Alfke <email@hidden>
    • Re: Showing activity indicator during data download
      • From: Alastair Houghton <email@hidden>
References: 
 >Showing activity indicator during data download (From: DKJ <email@hidden>)
 >Re: Showing activity indicator during data download (From: DKJ <email@hidden>)
 >Re: Showing activity indicator during data download (From: Alastair Houghton <email@hidden>)
 >Re: Showing activity indicator during data download (From: DKJ <email@hidden>)
 >Re: Showing activity indicator during data download (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: Showing activity indicator during data download
  • Next by Date: Re: Showing activity indicator during data download
  • Previous by thread: Re: Showing activity indicator during data download
  • Next by thread: Re: Showing activity indicator during data download
  • Index(es):
    • Date
    • Thread