Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-25 Thread Jonas Sicking
On Mon, Apr 18, 2011 at 8:48 PM, Eric Uhrhane er...@google.com wrote: Apologies for the slow response.  I wanted to go back and reread the relevant specs before I said anything more.  Having done so, I found that XHR and FileReader were more similar than I had remembered. However, I believe I

RE: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-18 Thread Adrian Bateman
On Friday, April 15, 2011 2:41 PM, Jonas Sicking wrote: On Fri, Apr 15, 2011 at 12:53 PM, Adrian Bateman adria...@microsoft.com wrote: Yes, we could live with it but the semantics are more complex. Is this the same as calling abort() then readAsXXX()? Yes. I.e. the semantics of readAsX is

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-18 Thread Jonas Sicking
On Mon, Apr 18, 2011 at 9:02 AM, Adrian Bateman adria...@microsoft.com wrote: On Friday, April 15, 2011 2:41 PM, Jonas Sicking wrote: On Fri, Apr 15, 2011 at 12:53 PM, Adrian Bateman adria...@microsoft.com wrote: Yes, we could live with it but the semantics are more complex. Is this the

RE: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-18 Thread Adrian Bateman
On Monday, April 18, 2011 12:04 PM, Jonas Sicking wrote: On Mon, Apr 18, 2011 at 9:02 AM, Adrian Bateman adria...@microsoft.com wrote: On Friday, April 15, 2011 2:41 PM, Jonas Sicking wrote: Yes. I.e. the semantics of readAsX is basically: readAsX(...) {   if (requestInProgress)    

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-18 Thread Jonas Sicking
On Mon, Apr 18, 2011 at 12:55 PM, Adrian Bateman adria...@microsoft.com wrote: On Monday, April 18, 2011 12:04 PM, Jonas Sicking wrote: On Mon, Apr 18, 2011 at 9:02 AM, Adrian Bateman adria...@microsoft.com wrote: On Friday, April 15, 2011 2:41 PM, Jonas Sicking wrote: Yes. I.e. the

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-18 Thread Arun Ranganathan
On 4/18/11 3:55 PM, Adrian Bateman wrote: On Monday, April 18, 2011 12:04 PM, Jonas Sicking wrote: On Mon, Apr 18, 2011 at 9:02 AM, Adrian Batemanadria...@microsoft.com wrote: On Friday, April 15, 2011 2:41 PM, Jonas Sicking wrote: Yes. I.e. the semantics of readAsX is basically:

RE: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-15 Thread Adrian Bateman
On Tuesday, April 12, 2011 12:08 PM, Jonas Sicking wrote: FileReader is extremely similar to XMLHttpRequest. The main difference is in how you initiate the request (.open/.send vs. .readAsX). This similarity is even getting stronger now that XHR gets .result. So I think there are good

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-15 Thread Arun Ranganathan
On 4/15/11 2:57 PM, Adrian Bateman wrote: On Tuesday, April 12, 2011 12:08 PM, Jonas Sicking wrote: FileReader is extremely similar to XMLHttpRequest. The main difference is in how you initiate the request (.open/.send vs. .readAsX). This similarity is even getting stronger now that XHR gets

RE: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-15 Thread Adrian Bateman
On Friday, April 15, 2011 12:16 PM, Arun Ranganathan wrote: On 4/15/11 2:57 PM, Adrian Bateman wrote: With this in mind, I don't personally have a strong feeling either way between having to call abort() explicitly or having readAsXXX implicitly call abort(). I've discussed it with others

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-15 Thread Jonas Sicking
On Fri, Apr 15, 2011 at 12:53 PM, Adrian Bateman adria...@microsoft.com wrote: On Friday, April 15, 2011 12:16 PM, Arun Ranganathan wrote: On 4/15/11 2:57 PM, Adrian Bateman wrote: With this in mind, I don't personally have a strong feeling either way between having to call abort()

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-12 Thread Arun Ranganathan
On 4/11/11 1:39 PM, Adrian Bateman wrote: On Monday, April 11, 2011 10:23 AM, Eric Uhrhane wrote: On Mon, Apr 11, 2011 at 9:33 AM, Arun Ranganathana...@mozilla.com wrote: In general, I'm averse to throwing, since I think it puts an additional burden on the developer (to catch, for example).

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-12 Thread Eric Uhrhane
On Tue, Apr 12, 2011 at 11:44 AM, Arun Ranganathan a...@mozilla.com wrote: On 4/11/11 1:39 PM, Adrian Bateman wrote: On Monday, April 11, 2011 10:23 AM, Eric Uhrhane wrote: On Mon, Apr 11, 2011 at 9:33 AM, Arun Ranganathana...@mozilla.com  wrote: In general, I'm averse to throwing, since I

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-12 Thread Jonas Sicking
On Mon, Apr 11, 2011 at 10:39 AM, Adrian Bateman adria...@microsoft.com wrote: On Monday, April 11, 2011 10:23 AM, Eric Uhrhane wrote: On Mon, Apr 11, 2011 at 9:33 AM, Arun Ranganathan a...@mozilla.com wrote: In general, I'm averse to throwing, since I think it puts an additional burden on

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-11 Thread Arun Ranganathan
On 3/31/11 6:12 PM, Eric Uhrhane wrote: On Thu, Mar 31, 2011 at 2:55 PM, Adrian Batemanadria...@microsoft.com wrote: On Thursday, March 31, 2011 10:19 AM, Arun Ranganathan wrote: On 3/30/11 2:01 PM, Eric Uhrhane wrote: On Mon, Mar 28, 2011 at 5:37 PM, Adrian Batemanadria...@microsoft.com

RE: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-11 Thread Adrian Bateman
On Monday, April 11, 2011 8:28 AM, Arun Ranganathan wrote: On 3/31/11 6:12 PM, Eric Uhrhane wrote: I think it's cleaner and simpler just to throw. FileReader and XHR are already different enough that a bit more, as long as it's a usability improvement, isn't a big deal. The efficiency

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-11 Thread Arun Ranganathan
On 4/11/11 12:05 PM, Adrian Bateman wrote: On Monday, April 11, 2011 8:28 AM, Arun Ranganathan wrote: On 3/31/11 6:12 PM, Eric Uhrhane wrote: I think it's cleaner and simpler just to throw. FileReader and XHR are already different enough that a bit more, as long as it's a usability

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-11 Thread Glenn Maynard
On Mon, Apr 11, 2011 at 12:33 PM, Arun Ranganathan a...@mozilla.com wrote: In general, I'm averse to throwing, since I think it puts an additional burden on the developer (to catch, for example). Only if the developer is trying to catch all exceptions, which you usually don't. Most

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-11 Thread Eric Uhrhane
On Mon, Apr 11, 2011 at 9:05 AM, Adrian Bateman adria...@microsoft.com wrote: On Monday, April 11, 2011 8:28 AM, Arun Ranganathan wrote: On 3/31/11 6:12 PM, Eric Uhrhane wrote: I think it's cleaner and simpler just to throw.  FileReader and XHR are already different enough that a bit more,

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-11 Thread Arun Ranganathan
On 4/11/11 1:04 PM, Glenn Maynard wrote: On Mon, Apr 11, 2011 at 12:33 PM, Arun Ranganathan a...@mozilla.com mailto:a...@mozilla.com wrote: In general, I'm averse to throwing, since I think it puts an additional burden on the developer (to catch, for example). Only if the developer

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-11 Thread Glenn Maynard
On Mon, Apr 11, 2011 at 1:28 PM, Arun Ranganathan a...@mozilla.com wrote: On the main thread, with your proposal, all reads will stop since an exception has been raised. That's odd--why would that happen? Normally one expects an API call that throws an exception to have no effect. It'd

RE: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-11 Thread Adrian Bateman
On Monday, April 11, 2011 10:23 AM, Eric Uhrhane wrote: On Mon, Apr 11, 2011 at 9:33 AM, Arun Ranganathan a...@mozilla.com wrote: In general, I'm averse to throwing, since I think it puts an additional burden on the developer (to catch, for example). I don't think so. I think that calling

RE: [FileAPI] Result of calling MultipleReads on FileReader

2011-03-31 Thread Adrian Bateman
On Thursday, March 31, 2011 10:19 AM, Arun Ranganathan wrote: On 3/30/11 2:01 PM, Eric Uhrhane wrote: On Mon, Mar 28, 2011 at 5:37 PM, Adrian Batemanadria...@microsoft.com wrote: Is there a reason for the current spec text? I don't know the original rationale, but in the absence of any

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-03-31 Thread Eric Uhrhane
On Thu, Mar 31, 2011 at 2:55 PM, Adrian Bateman adria...@microsoft.com wrote: On Thursday, March 31, 2011 10:19 AM, Arun Ranganathan wrote: On 3/30/11 2:01 PM, Eric Uhrhane wrote: On Mon, Mar 28, 2011 at 5:37 PM, Adrian Batemanadria...@microsoft.com wrote: Is there a reason for the current

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-03-30 Thread Eric Uhrhane
On Mon, Mar 28, 2011 at 5:37 PM, Adrian Bateman adria...@microsoft.com wrote: As we continue to experiment with the File API, I'm trying to understand the rationale for the Multiple Reads section: http://dev.w3.org/2006/webapi/FileAPI/#MultipleReads The spec says:   If multiple read methods

[FileAPI] Result of calling MultipleReads on FileReader

2011-03-28 Thread Adrian Bateman
As we continue to experiment with the File API, I'm trying to understand the rationale for the Multiple Reads section: http://dev.w3.org/2006/webapi/FileAPI/#MultipleReads The spec says: If multiple read methods are called on the same FileReader object, user agents MUST only process the