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 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 also found th

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-04-18 Thread Eric Uhrhane
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 also found that the exception solution is just as consistent with XHR as th

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 Bateman wrote: On Friday, April 15, 2011 2:41 PM, Jonas Sicking wrote: Yes. I.e. the semantics of readAsX is basically: readAsX(...) { if (requestInPro

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 wrote: > On Monday, April 18, 2011 12:04 PM, Jonas Sicking wrote: >> On Mon, Apr 18, 2011 at 9:02 AM, Adrian Bateman >> 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-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 > wrote: > > On Friday, April 15, 2011 2:41 PM, Jonas Sicking wrote: > >> Yes. I.e. the semantics of readAsX is basically: > >> > >> readAsX(...) { > >>   if (requestInProgress) > >>     abor

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 wrote: > On Friday, April 15, 2011 2:41 PM, Jonas Sicking wrote: >> On Fri, Apr 15, 2011 at 12:53 PM, Adrian Bateman >> wrote: >> > Yes, we could live with it but the semantics are more complex. Is this the >> > same as calling abort() then readAsXX

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 > 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 basically: >

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 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() explicitly or having re

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 ot

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

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

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 wrote: > On Monday, April 11, 2011 10:23 AM, Eric Uhrhane wrote: >> On Mon, Apr 11, 2011 at 9:33 AM, Arun Ranganathan wrote: >> > In general, I'm averse to throwing, since I think it puts an additional >> > burden on the developer (to catch, for ex

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 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 Ranganathan >>>  wrote: In general, I'm averse to throwing, since I think it p

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 Ranganathan 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.

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 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 two read m

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 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 be particul

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 > 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 catc

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 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

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 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 developers don't try to

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 improvement

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 efficien

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 Bateman 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 Bateman wrote: Is there a reason for the current spec

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 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 Bateman >> wrote: >> >> Is there a reason for the current spec text? >> > I don't know the

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 Bateman > wrote: > >> Is there a reason for the current spec text? > > I don't know the original rationale, but in the absence of any strong > > techni

Re: [FileAPI] Result of calling MultipleReads on FileReader

2011-03-31 Thread Arun Ranganathan
Eric, Adrian, On 3/30/11 2:01 PM, Eric Uhrhane wrote: On Mon, Mar 28, 2011 at 5:37 PM, Adrian Bateman 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 sa

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 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 are called on t