I have an NSTextView/NSTextStorage combination and I want to track the 'modified' state of the text storage.
I could simply watch for changes to the text and update my 'modifiedDate' variable - problem is I need UNDO to work also - and UNDO should also undo the modifiedDate.
If I update my modifiedDate variable each time the text changes then it works - but UNDO on the TextView will be one character at a time (not desirable.)
I did try looking for undoManagerWillCloseUndoGroupNotification and updating my modifiedDate there, but I get the same effect (single character undo) I thought it might 'slip' the modifiedDate undo inside the TextView undo group - but it appears not.
This is either one of those things that just can't be done - or it's simple - can someone put me out of my misery?
Thanks