[PATCH] - Add initWithContentsOfURL, arrayWithContentsOfURL, initWithContentsOfFile, arrayWithContentsOfFile to CPArray

9 views
Skip to first unread message

Emmanuel Maillard

unread,
Feb 5, 2010, 7:08:09 PM2/5/10
to objecti...@googlegroups.com
Hi,

Does it need to be split in smaller patches ?
Any comments welcome.
Cheers

Emmanuel


0001-Add-initWithContentsOfURL-arrayWithContentsOfURL.patch

Ross Boucher

unread,
Feb 9, 2010, 1:59:11 PM2/9/10
to objecti...@googlegroups.com
I'm open to hearing opinions on this, but I'm weary of accepting this patch. There are a lot of people who don't understand the fundamental limitations of the browser, and think that synchronous requests are OK. They are almost universally a bad idea, for all the obvious reasons.

I'm not sure including an API which makes something *look* super simple when in fact it could cause all kinds of headaches. I'd rather include a variant of the Cocoa API which forces asynchronous behavior and uses a callback method or function.

What do other people think?

> --
> You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J Development List" group.
> To post to this group, send email to objecti...@googlegroups.com.
> To unsubscribe from this group, send email to objectivej-de...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/objectivej-dev?hl=en.
>
> <0001-Add-initWithContentsOfURL-arrayWithContentsOfURL.patch>

Francisco Tolmasky

unread,
Feb 9, 2010, 3:36:03 PM2/9/10
to Cappuccino & Objective-J Development List
This is a tough call, I agree with Ross that this has a high potential
for misuse, but it does bring parity with Cocoa APIs, along with being
usefull in the terminal. Perhaps we should add these AND the
asynchronous analogs.

>  0001-Add-initWithContentsOfURL-arrayWithContentsOfURL.patch
> 3KViewDownload

Emmanuel Maillard

unread,
Feb 11, 2010, 8:30:49 AM2/11/10
to objecti...@googlegroups.com
Does asynchronous calls are well defined for an initWith* method ?

It would not better to add a method like : -addObjectsWithContentsOfFile: delegate:
and delegate methods like (-arrayFinishAddingObjects, -arrayDidFailedAddingObjects ...)
for asynchronous call ?

Reply all
Reply to author
Forward
0 new messages