Is there a way to somehow link an NSDocument
's changeCount
to the only NSTextView
that is used for a document?
Or so I have to implement all the necessary NSTextViewDelegate
methods and update the changeCount
myself?
Is there a way to somehow link an NSDocument
's changeCount
to the only NSTextView
that is used for a document?
Or so I have to implement all the necessary NSTextViewDelegate
methods and update the changeCount
myself?
Create a document-based application. Place an instance of NSTextView in the document's window. Build and run the application.
Type something into the text view. You'll see the window's title bar reflect the edited status of the document. Try undoing and redoing; even that works. (You'll still have to implement code to save the text view's content, but that's outside the scope of your question.)
If you're worried about the change count because of any of this, then to answer your question: You don't have to do anything.