• 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: Progress for archiving/dearchiving
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progress for archiving/dearchiving


  • Subject: Re: Progress for archiving/dearchiving
  • From: Jeffrey Oleander <email@hidden>
  • Date: Mon, 16 Sep 2013 12:51:29 -0400

On 2013 Sep 16, at 08:53, Graham Cox wrote:
If I wanted to add some sort of progress reporting to archiving and dearchiving, what's a good way to do it? The problem seems to me to know what the 'count' of things read from/written to the file is to set the progress max value. Since the delegate gets called for each object instantiated, that part of it isn't a problem, I can just bump a counter. Counting the objects rather than actual bytes is probably as fine-grained as I need to get.

I'll bite. If you want to know the total number of objects to be archived, then you need to count them, at some time or another. To count them, you need to walk the object tree before you start actually archiving... which may take a significant fraction of the time it takes to archive.

Then, you could make sure it's the first thing that is archived, and hence the first thing unarchived... after which you can display/update the progress bar.

Yah, I know; ugly, but unavoidable as far as I know.

_______________________________________________

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: Progress for archiving/dearchiving
      • From: Marcel Weiher <email@hidden>
    • Re: Progress for archiving/dearchiving
      • From: Graham Cox <email@hidden>
References: 
 >Progress for archiving/dearchiving (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Very strange Xpc magic
  • Next by Date: Re: Unwanted presentedItemDidMoveToURL: for old file after using setFileURL: to specify a new file
  • Previous by thread: Re: Progress for archiving/dearchiving
  • Next by thread: Re: Progress for archiving/dearchiving
  • Index(es):
    • Date
    • Thread