• 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: Intercept Save when closing NSDocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intercept Save when closing NSDocument


  • Subject: Re: Intercept Save when closing NSDocument
  • From: Kevin Perry <email@hidden>
  • Date: Fri, 10 Feb 2017 10:00:14 -0800

NSSavePanelDelegate is probably the approach you want to take, with -[NSDocument prepareSavePanel:] being the most convenient means of inserting your delegate.

> On Feb 10, 2017, at 9:41 AM, Quincey Morris <email@hidden> wrote:
>
> On Feb 10, 2017, at 08:12 , Trygve Inda <email@hidden> wrote:
>>
>> I would like to disable the Save button
>> for a demo version of our app.
>
> Have you looked at the NSSavePanelDelegate methods? One approach would be to use panel:validateURL:error: to prevent the save proceeding. Another would be to use (say) panelSelectionDidChange: to explicitly disable the Save button (which has a documented view tag) if that works the the XPC environment of the Save dialog.
>
> _______________________________________________
>
> 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


_______________________________________________

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: 
 >Intercept Save when closing NSDocument (From: Trygve Inda <email@hidden>)
 >Re: Intercept Save when closing NSDocument (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Intercept Save when closing NSDocument
  • Next by Date: Re: Optionality in a NSManagedObject sub-class
  • Previous by thread: Re: Intercept Save when closing NSDocument
  • Next by thread: Re: Intercept Save when closing NSDocument
  • Index(es):
    • Date
    • Thread