KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How do I prevent a window title from displaying "Edited" for an NSDocument which is dirty? I'm managing saving and autosaving myself, using a web service, and just don't want the distraction in the title bar. I've tried overriding: NSDocument's -isDocumentEdited and -hasUnautosavedChanges always to return NO . -[NSWindowController setDocumentEdited] to do nothing, or always to use NO regardless of the parameter's actual value. -[NSWindowController synchronizeWindowTitleWithDocumentName] to do nothing. -[NSWindow setDocumentEdited] to do nothing, or always to use NO regardless of the parameter's actual value. In all cases, the title bar still changes to Edited when I make changes to a saved document. If I override -[NSDocument updateChangeCount:] and -[NSDocument updateChangeCountWithToken:forSaveOperation:] to do nothing, I can prevent this from happening, but it affects saving, autosaving, and other document behaviors, too. I also tried this: [[self.window standardWindowButton: NSWindowDocumentVersionsButton] setTitle:nil]; That displayed a blank string instead of Edited, but the dash still appeared – the one which normally separates the document name and Edited. Any idea how to pry apart this part of the window from the document?
Tags (comma-separated)
Save Edits
Cancel