On 23 Jul 2008, at 10:55 pm, John Love wrote:
you just need to call updateChangeCount, rather than mess with
overriding NSDocument's –isDocumentEdited.
Well, yes. q.v. what I stated in my last message.
Apple's comments within their "NSDocument.h" state that wit
controllers setDocumentEdited: messages when
appropriate."
I have deleted my override of NSDocument's –isDocumentEdited within
MyDocument.m and recorded the fact that MyDocument may have been edited via
calling my own setFileEdited whenever I see a possibility of editing
MyDocument.
-
Normally you "tell" a document that it is edited in one of two ways -
either a) by maintaining an Undo stack in which case it "just works",
and b) by calling -updateChangeCount: The method you mention is a
lower level method that is not meant to be overridden, as far as I'm
aware. If you us
Within MyDocument's isDocumentEdited I have code to determine whether
MyDocument is edited and return the BOOLean flag accordingly.
I then discovered that the only way to set the window's "dirty" flag was to
*explicitly* call [window setDocumentEdited:editedFlag] within other methods
by duplicatin