Re: Using progress events for other purposes

On Mon, 19 Oct 2009 11:38:27 +0200, Ian Hickson <ian@hixie.ch> wrote:

> On Mon, 19 Oct 2009, Simon Pieters wrote:
>> On Mon, 19 Oct 2009 10:24:37 +0200, Ian Hickson <ian@hixie.ch> wrote:
>> > > >
>> > > > So in a hypothetical system that gives progress for multiple large
>> > > > files in a row, you can't have a case where some of the files have
>> > > > unknown sizes?
>> > >
>> > > Yes, you can.
>> >
>> > How?
>>
>> If I understand Chaals' proposal correctly, you'd set lengthComputable
>> to false, loaded to the number of bytes having been downloaded for the
>> current file, total to 0, loadedItems to the number of files that have
>> finished, and totalItems to the total number of files.
>
> Chaals said "IFF they have lengthComputable true then the loaded and  
> total refer to the particular item", which seems to contradict the above.
> If we just say that those attributes are meaningless in events that don't
> have file data, that works, but then the "IFF" condition isn't needed.

Right. Turns out Simon was better at parsing what I *meant* than I was at  
expressing it. But as I have it in my head, we do need to say what the  
original attributes mean if there are loadedItems or totalItems (which is  
that they refer to the current item rather than e.g. the overall  
transaction set). That idea is of course is open to question.

tracker, this is ISSUE-105

cheers

Chaals

-- 
Charles McCathieNevile  Opera Software, Standards Group
     je parle français -- hablo español -- jeg lærer norsk
http://my.opera.com/chaals       Try Opera: http://www.opera.com

Received on Monday, 19 October 2009 11:25:12 UTC