Re: Progress for archiving/dearchiving
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