On Aug 4, 2010, at 7:48 PM, Gideon King <gid...@novamind.com> wrote: > I think maybe my explanation could be clearer. Here's the flow: > > 1. User initiates import of file of type "fred" > 2. I pick that up in -readFromURL:ofType:error:, and spawn a process which > converts files of type "fred" to type "myfiletype", the native file type of > the application. Let's say that it is stored in a file called > /MyImports/file.mytype. > 3. Still in -readFromURL:ofType:error:, I call super, telling it to load the > converted file, and then call [self setFileURL:nil]; [self > setFileType:@"myfiletype"];
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