Re: Progress for archiving/dearchiving
Re: Progress for archiving/dearchiving
- Subject: Re: Progress for archiving/dearchiving
- From: Graham Cox <email@hidden>
- Date: Mon, 16 Sep 2013 19:25:59 +0200
On 16/09/2013, at 6:51 PM, Jeffrey Oleander <email@hidden> wrote:
> 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.
I can count them as I archive, using the delegate.
> 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.
It can actually be the last thing archived, but the first thing unarchived (you can do that with keyed archiving). But it might also be something that can be stored in my info file rather than the archive itself.
What I was sort of hoping was that there was a way to figure out from the archive how many objects there were without having to archive the number explicitly. For example, the root level of an archive is a dictionary, which has a count, but that's only the top level. Going more into the way archives are actually stored, maybe the $top array might be a more accurate count? Dunno, I guess I'll have to experiment.
--Graham
_______________________________________________
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