Re: [File API] Draft for Review

2012-01-27 Thread Charles Pritchard
On 1/27/12 3:58 PM, Arun Ranganathan wrote: On 1/26/12 1:21 PM, Arun Ranganathan wrote: Yes, this is nicer. There's no way to create a new File object: I can't set name and lastModifiedDate. These can't be done, but there is FileSaver/FileWriter). It's a minor thing, but there are items lik

Re: [File API] Draft for Review

2012-01-27 Thread Arun Ranganathan
> On 1/26/12 1:21 PM, Arun Ranganathan wrote: > Yes, this is nicer. There's no way to create a new File object: I > can't > set name and lastModifiedDate. These can't be done, but there is FileSaver/FileWriter). > > There's an error in the blob constructor code. It uses object > notation > fo

Re: [File API] Draft for Review

2012-01-27 Thread Glenn Maynard
On Fri, Jan 27, 2012 at 11:04 AM, Tab Atkins Jr. wrote: > ...yes? It can be. I made the general argument above - if an > optional argument has *no relation* to expected future optional > arguments, then it shouldn't be an optional argument at all, it should > be a keyword argument instead (imple

Re: [File API] Draft for Review

2012-01-27 Thread Charles Pritchard
On 1/26/12 1:21 PM, Arun Ranganathan wrote: Greetings public-webapps, I'd like to encourage some review of File API: http://dev.w3.org/2006/webapi/FileAPI/ You can send comments to this listserv, or file a bug, since this spec. now has a Bugzilla component. Here are some notable changes: 1.

Re: [File API] Draft for Review

2012-01-27 Thread Arun Ranganathan
(Sorry for top-posting; I'm dealing with a sub-par mail client due to ongoing mail server issues). Tab: You've handsomely made the point to replace the existing optional boolean with a dictionary (which is what we do for the Blob constructor). I suppose I thought the dictionary was overkill f

Re: [File API] Draft for Review

2012-01-27 Thread Tab Atkins Jr.
On Fri, Jan 27, 2012 at 5:59 AM, Glenn Maynard wrote: > On Thu, Jan 26, 2012 at 11:09 PM, Mike Taylor wrote: >> >> Yes, synthetic keypress have multiple problems--which is why we all use >> libraries to not have to author them by hand. >> >> Regardless, this doesn't change the fact that >> window

Re: [File API] Draft for Review

2012-01-27 Thread Glenn Maynard
On Thu, Jan 26, 2012 at 11:09 PM, Mike Taylor wrote: > Yes, synthetic keypress have multiple problems--which is why we all use > libraries to not have to author them by hand. > > Regardless, this doesn't change the fact that window.URL.createObjectURL(* > *file, true) is more opaque (and for me,

Re: [File API] Draft for Review

2012-01-26 Thread Mike Taylor
On Thu, 26 Jan 2012 22:54:39 -0600, Glenn Maynard wrote: On Thu, Jan 26, 2012 at 10:45 PM, Mike Taylor wrote: As someone who occasionally has to look up if the 3rd argument to XMLHttpRequest.open() means sync or async, I agree with Tab. And that's something I've been using for years. Forget

Re: [File API] Draft for Review

2012-01-26 Thread Glenn Maynard
On Thu, Jan 26, 2012 at 10:45 PM, Mike Taylor wrote: > As someone who occasionally has to look up if the 3rd argument to > XMLHttpRequest.open() means sync or async, I agree with Tab. And that's > something I've been using for years. Forget about synthetic keyboard events > [1]: > > event.initKey

Re: [File API] Draft for Review

2012-01-26 Thread Mike Taylor
On Thu, 26 Jan 2012 21:23:46 -0600, Glenn Maynard wrote: On Thu, Jan 26, 2012 at 7:01 PM, Tab Atkins Jr. wrote: That's not necessary. There are situations when optional arguments make sense. They should be avoided, though, when you expect that *future* optional arguments will have nothing

Re: [File API] Draft for Review

2012-01-26 Thread Glenn Maynard
On Thu, Jan 26, 2012 at 6:54 PM, Ojan Vafai wrote: > > That said, I sympathize that the overhead of creating an object or needing > to do a string compare just for a boolean is kind of sucky. > I'd expect implementations to mostly optimize away string comparisons with string interning, though.

Re: [File API] Draft for Review

2012-01-26 Thread Tab Atkins Jr.
On Thu, Jan 26, 2012 at 4:42 PM, Glenn Maynard wrote: > On Thu, Jan 26, 2012 at 6:25 PM, Tab Atkins Jr. > wrote: >> As I argued in >> , >> we should absolutely *not* be adding more boolean arguments to the >> platform.  They

Re: [File API] Draft for Review

2012-01-26 Thread Ojan Vafai
On Thu, Jan 26, 2012 at 4:42 PM, Glenn Maynard wrote: > On Thu, Jan 26, 2012 at 6:25 PM, Tab Atkins Jr. wrote: > >> As I argued in < >> http://lists.w3.org/Archives/Public/public-webapps/2011OctDec/1520.html>, >> we should absolutely *not* be adding more boolean arguments to the >> platform. The

Re: [File API] Draft for Review

2012-01-26 Thread Charles Pritchard
On 1/26/12 4:39 PM, Jonas Sicking wrote: On Thu, Jan 26, 2012 at 4:25 PM, Tab Atkins Jr. wrote: On Thu, Jan 26, 2012 at 1:21 PM, Arun Ranganathan wrote: 2. URL.createObjectURL now takes an optional boolean, following discussions on the listserv [oneTimeOnly]. As I argued in

Re: [File API] Draft for Review

2012-01-26 Thread Glenn Maynard
On Thu, Jan 26, 2012 at 6:25 PM, Tab Atkins Jr. wrote: > As I argued in < > http://lists.w3.org/Archives/Public/public-webapps/2011OctDec/1520.html>, > we should absolutely *not* be adding more boolean arguments to the > platform. They should be exposed as boolean properties in an > dictionary.

Re: [File API] Draft for Review

2012-01-26 Thread Jonas Sicking
On Thu, Jan 26, 2012 at 4:25 PM, Tab Atkins Jr. wrote: > On Thu, Jan 26, 2012 at 1:21 PM, Arun Ranganathan > wrote: >> 2. URL.createObjectURL now takes an optional boolean, following discussions >> on the listserv [oneTimeOnly]. > > As I argued in >

Re: [File API] Draft for Review

2012-01-26 Thread Tab Atkins Jr.
On Thu, Jan 26, 2012 at 1:21 PM, Arun Ranganathan wrote: > 2. URL.createObjectURL now takes an optional boolean, following discussions > on the listserv [oneTimeOnly]. As I argued in , we should absolutely *not* be adding

Re: [File API] Draft for Review

2012-01-26 Thread Glenn Maynard
On Thu, Jan 26, 2012 at 3:21 PM, Arun Ranganathan wrote: > 2. URL.createObjectURL now takes an optional boolean, following > discussions on the listserv [oneTimeOnly]. > These questions weren't addressed: http://lists.w3.org/Archives/Public/public-webapps/2011OctDec/1525.html The only response t

[File API] Draft for Review

2012-01-26 Thread Arun Ranganathan
Greetings public-webapps, I'd like to encourage some review of File API: http://dev.w3.org/2006/webapi/FileAPI/ You can send comments to this listserv, or file a bug, since this spec. now has a Bugzilla component. Here are some notable changes: 1. Blob is now constructable, following discu