Re: Preventing NSSavePanel from alerting file overwrite
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