• 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: Preventing NSSavePanel from alerting file overwrite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preventing NSSavePanel from alerting file overwrite


  • Subject: Re: Preventing NSSavePanel from alerting file overwrite
  • From: Fritz Anderson <email@hidden>
  • Date: Wed, 06 Jun 2012 15:27:04 -0500

On 6 Jun 2012, at 1:03 PM, Lee Ann Rucker wrote:

> Implement "panel:userEnteredFilename:confirmed:". Mine returns "nil" because I put up my own dialog, but that also causes the panel to stay up so the user has to enter something else.
>
> I haven't tried but I'd guess returning a placeholder filename that's known not to exist will also prevent the dialog showing and let the panel close. You can save the incoming filename so you know what the real user choice was, or append a magic extension to mark it as a temporary placeholder for an existing file.

This is a problem for sandboxing:

> Open and Save Dialog Behavior with App Sandbox
>
> Certain NSOpenPanel and NSSavePanel methods behave differently when App Sandbox is enabled for your app:
>
> 	• You cannot invoke the OK button using the ok: method.
> 	• You cannot rewrite the user’s selection using the panel:userEnteredFilename:confirmed: method from the NSOpenSavePanelDelegate protocol.

<http://developer.apple.com/library/mac/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW8>

	— F


_______________________________________________

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: 
 >Preventing NSSavePanel from alerting file overwrite (From: Gordon Apple <email@hidden>)
 >Re: Preventing NSSavePanel from alerting file overwrite (From: Lee Ann Rucker <email@hidden>)

  • Prev by Date: Re: sending html file to safari for printing
  • Next by Date: Re: can't hide scrollbar on NSTableView
  • Previous by thread: Re: Preventing NSSavePanel from alerting file overwrite
  • Next by thread: Re: Preventing NSSavePanel from alerting file overwrite
  • Index(es):
    • Date
    • Thread