• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: interrupting a modified document save (as) invocation, security
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >interrupting a modified document save (as) invocation, security (From: David Harper <email@hidden>)

  • Prev by Date: [iPhone] Getting an UIImageView to display under a UITableView
  • Next by Date: Re: [iPhone] Getting an UIImageView to display under a UITableView
  • Previous by thread: interrupting a modified document save (as) invocation, security
  • Next by thread: Most efficient way of measuring text
  • Index(es):
    • Date
    • Thread