• 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: Lee Ann Rucker <email@hidden>
  • Date: Wed, 06 Jun 2012 11:03:05 -0700

On Jun 6, 2012, at 10:04 AM, Gordon Apple wrote:

> Is there a way to block NSSavePanel from alerting a file overwrite?  I¹m
> using it simply to establish a URL and later alert about overwrite when a
> record command is issued.  I would prefer to not have the user see this
> twice.

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.
_______________________________________________

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: Preventing NSSavePanel from alerting file overwrite
      • From: Fritz Anderson <email@hidden>
References: 
 >Preventing NSSavePanel from alerting file overwrite (From: Gordon Apple <email@hidden>)

  • Prev by Date: Re: Data encryption
  • Next by Date: Re: Preventing NSSavePanel from alerting file overwrite
  • Previous by thread: Preventing NSSavePanel from alerting file overwrite
  • Next by thread: Re: Preventing NSSavePanel from alerting file overwrite
  • Index(es):
    • Date
    • Thread