问题
Can't find the Cocoa API call to set the modified marker of a window.
回答1:
If you’re using the NSDocument architecture it should happen automatically.
If not, and you’re using NSWindowController, you should use its setDocumentEdited:
method.
If you’re not using a window controller, use NSWindow’s setDocumentEdited:
method.
来源:https://stackoverflow.com/questions/3581375/how-do-i-display-the-modified-dot-in-the-red-button-of-an-nswindow