I'm trying to create document scoped security URL bookmarks, for a document format that needs to refer to other documents. But it seems like the first time I save a document, there's a catch-22 in creating the bookmarks.
Creating a document scoped bookmark requires my document's URL as one of the arguments. If I implement dataOfType:error:, I can't create a document-scope bookmark in my NSDocument subclass because [self fileURL] is nil. I end up creating an app-scoped bookmark instead, though it's not what I want. If I implement writeToURL:ofType:error:, I get a URL for my document as the first argument. But, I still can't create the bookmark because my document doesn't exist yet. I get an error reading 'The file “[name]” couldn’t be opened because there is no such file'. So, when am I supposed to create these bookmarks? Do I need to have the user save an empty document first just so I can create these bookmarks the next time around? -- Tom Harrington atomicb...@gmail.com AIM: atomicbird1 _______________________________________________ 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