Re: Importing to core data persistent document
Re: Importing to core data persistent document
- Subject: Re: Importing to core data persistent document
- From: Gideon King <email@hidden>
- Date: Thu, 5 Aug 2010 13:59:27 +1000
Yes, I did think of putting it elsewhere, but I would have thought the problem would be the same. Say I overrode the NSDocumentController openDocumentWidhContentsOfURL:ofType:error: and had that do the conversion to my native document type, then call the NSDocumentController implementation, it would load the native format file, but I would still have a document that would have a name assigned to it in the persistent store, and if I then changed the URL to nil in the document, I'd be back to square one. The document architecture would be thinking of it as a new document, and the persistent store would be thinking of it as an existing document.
Gideon
On 05/08/2010, at 1:17 PM, Kyle Sluder wrote:
>
> Ouch, this sounds like a bad idea. I would expect -fileURL to return something meaningful after -readFromURL:ofType:error:.
>
> Have you thought of putting this conversion logic in a subclass of NSDocumentController instead? That way you don't violate NSDocument's expectation of being associated with the file it was opened from.
>
> --Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden