Re: interrupting a modified document save (as) invocation, security
Re: interrupting a modified document save (as) invocation, security
- Subject: Re: interrupting a modified document save (as) invocation, security
- From: Ashley Clark <email@hidden>
- Date: Tue, 12 May 2009 13:14:09 -0500
On May 12, 2009, at 12:01 PM, David Harper wrote:
Hello,
I'm finalizing an application which disallows document saving when
not registered. I've put interrupts in my NSDocument subclass' -
saveDocument: and -saveDocumentAs: methods so that [super ...] is
only invoked if the application is registered.
However, I've just noticed that when a document is modified so that
the undo stack is not empty (ie. every time the user closes a non-
empty document - approximately 100% of cases) neither of these
methods are called. So the trial user can successfully save by
closing and choosing "Save..." in the resulting dialog. I've also
interrupted -openDocument: in my MainMenuController so the user
cannot open the document manually, but the modified document appears
in the Open Recent submenu!
I suppose what I'm trying to ask is what method gets invoked upon a
prompted save to a modified document as opposed to a manual save via
the menu bar / toolbar?
The method that all direct saves funnel down to in Leopard's
NSDocument architecture is:
- (void)saveDocumentWithDelegate:(id)delegate didSaveSelector:
(SEL)didSaveSelector contextInfo:(void *)contextInfo
Ashley
_______________________________________________
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