0

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?

Jawap
  • 2,463
  • 3
  • 28
  • 46

1 Answers1

0

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.

Extra Savoir-Faire
  • 6,026
  • 4
  • 29
  • 47