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 (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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to