• 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 -canCloseDocumentWithDelegate::: not called when terminating
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument -canCloseDocumentWithDelegate::: not called when terminating


  • Subject: Re: NSDocument -canCloseDocumentWithDelegate::: not called when terminating
  • From: Markus Spoettl <email@hidden>
  • Date: Mon, 23 Jul 2012 19:51:34 +0200

On 7/23/12 6:22 PM, Kyle Sluder wrote:
I don't have my crazy autosave flowchart handy, but I *think* you should be
able to simply override -hasUnautosavedChanges to return YES if either super
returns YES or if your preferences file needs to be saved.
-autosaveWithImplicitCancellability:: is documented to check
-hasUnautosavedChanges, so I would assume that it is called unconditionally
at all places where AppKit wants to ensure the document is written to disk if
necessary.

Of course, this assumes you are returning YES from +autosavesInPlace.

Thanks for the idea, I'll think about that. Not using autosavesInPlace right now, but if it's the ticket to making this work, it may be worth reconsidering. I'm not a big fan of the feature, though.

Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________

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

  • Follow-Ups:
    • Re: NSDocument -canCloseDocumentWithDelegate::: not called when terminating
      • From: Kevin Perry <email@hidden>
References: 
 >NSDocument -canCloseDocumentWithDelegate::: not called when terminating (From: Markus Spoettl <email@hidden>)
 >Re: NSDocument -canCloseDocumentWithDelegate::: not called when terminating (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: NSDocument -canCloseDocumentWithDelegate::: not called when terminating
  • Next by Date: Badge drawing like NSDockTile
  • Previous by thread: Re: NSDocument -canCloseDocumentWithDelegate::: not called when terminating
  • Next by thread: Re: NSDocument -canCloseDocumentWithDelegate::: not called when terminating
  • Index(es):
    • Date
    • Thread