3

I'm writing a Document-Based App in OSX. I found when I change the contents of the doc, the app doesn't know the document has been changed. I can close the doc without warning, which causes my unsaved content to be lost.

How can I tell NSDocument that the document has been modified?

jscs
  • 63,694
  • 13
  • 151
  • 195
kilik52
  • 664
  • 1
  • 6
  • 13

1 Answers1

4

Use the updateChangeCount: method with NSChangeDone as argument.

JustSid
  • 25,168
  • 7
  • 79
  • 97