Tells the delegate that the user confirmed a filename choice by clicking Save in a Save panel.
- macOS 10.0+
The panel reporting the user’s confirmation of a filename choice.
The user’s filename choice.
true, the user clicked the Save button; if
false, the user did not.
You can either leave the filename alone, or return
nil to cancel the save and leave the Save panel as is. (If your app is not running in a sandbox, you can also sanitize the filename to remove undesirable characters, limit its length, and so on.)
This method is called before any required extension is appended to the filename and before the Save panel asks the user to replace an existing file, if applicable.
This method may be called multiple times in the sessions as the user types. In those cases,
ok will be
false until the user confirms the choice, in which case
ok will become
true. If the delegate does extensive validation or puts up alerts, it should do so only when