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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to