0

As I edit and then try to close a document in my document-based app, an NSSavePanel pops up. It says, "Do you want to save the changes made to the document “Untitled”?"

Is there any way to alter this message? -setMessage: does not do anything, apple's sample code called CustomSave apparently uses that method without any apparent effect.

4

1 回答 1

0

苹果技术支持:

覆盖返回 YES 的“autosavesInPlace”会更改未保存的更改保存对话框的 UI 行为,在这种情况下您不能覆盖消息字符串。我建议您继续采用自动保存,因为这在基于文档的情况下更常见可可应用程序。

第一次保存未命名的文档将允许您的消息字符串出现在保存对话框中,但是未命名文档的“关闭操作”,保存更改警报字符串成为顶部附近的保存对话框的一部分,不允许为您的消息字符串留出空间。

于 2015-07-09T14:23:44.453 回答