On 2012-11-30, at 4:46 PM, Mike Abdullah <cocoa...@mikeabdullah.net> wrote:

> 
> On 30 Nov 2012, at 18:59, Dave Fernandes <dave.fernan...@utoronto.ca> wrote:
> 
>> 
>> On 2012-11-30, at 6:42 AM, Mike Abdullah <cocoa...@mikeabdullah.net> wrote:
>> 
>>> One way to look at it is that NSPersistentDocument pretty much painted 
>>> itself into a corner from day 1, and it's too messy for Apple to untangle 
>>> that.
>> 
>> Can you elaborate?
> 
> Well it makes the assumptions that your document:
> 
> - is comprised of a single Core Data store
> - has a single managed object context

This definitely limits your options. But, is it necessary to support file 
wrappers and iCloud? (Just trying to educate myself about how documents work.)

> - works entirely on the main thread
This one is already opt-in for both opening and saving, so fragility shouldn't 
be an issue to upgrading the class.

[Aside: As far as I know you *can* actually open an NSPersistentDocument 
asynchronously. At least I haven't seen anything that says you can't, and it 
seems to work on every system I've tried it on.]

> - only ever saves on top of itself, or to a new location using "Save As"

I guess this is an implementation detail to me. I want to manage the data model 
and let the framework classes handle the "document stuff". If they could add 
all the Lion document behaviors to NSPersistentDocument, I don't see how they 
couldn't add file wrapper support. But then, I've never tried. (I have filed 
plenty of bug reports though. :)

> 
> I wonder if there's simply too much fragility in the existing subclasses that 
> people have shipped, which make it a royal pain to try and modernise.
> 


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to