Document scope security bookmark, catch 22?
Document scope security bookmark, catch 22?
- Subject: Document scope security bookmark, catch 22?
- From: Tom Harrington <email@hidden>
- Date: Wed, 14 Aug 2013 16:00:54 -0600
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
email@hidden
AIM: atomicbird1
_______________________________________________
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