• 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: NSDocument - preventing incomplete document from being saved
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument - preventing incomplete document from being saved


  • Subject: Re: NSDocument - preventing incomplete document from being saved
  • From: Fritz Anderson <email@hidden>
  • Date: Thu, 1 Jun 2006 12:52:40 -0500

On 29 May 2006, at 12:42 PM, Lon Giese wrote:

What's the best way to prevent document closure when the document is in an incomplete state?

I have tried overriding NSDocument's
canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:

but this is overly complicated because the main thrust of this method is to let the user decide if he wants to save the document.

canCloseDocument

is very good, but it has been deprecated and is not called when quitting the app (only widow closing) under 10.3.
How does the document architecture allow the programmer to decide if a document should be closed? I just need a simple way to return NO if the document is incomplete.

Have you some reason not to pass NO as the shouldClose: parameter of the shouldCloseSelector:?


	-- F

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSDocument - preventing incomplete document from being saved
      • From: Lon Giese <email@hidden>
  • Prev by Date: Re: Drawing views
  • Next by Date: core data - problem with NSPopupButtonCell
  • Previous by thread: Re: Drawing views
  • Next by thread: Re: NSDocument - preventing incomplete document from being saved
  • Index(es):
    • Date
    • Thread