undo without dirty document
undo without dirty document
- Subject: undo without dirty document
- From: Frode <email@hidden>
- Date: Tue, 27 Jun 2006 10:26:17 +0200
Hi!
I have a Cocoa document based application derived from the template
project. The document window contains a NSTabView with differents
controls and one single NSTextView. This single text view corresponds
to the only undoable action in my document. I have no other undoable
data or other customization of undo management.
The problem is that undo have recently stopped working, or not
really, it works but edits isnt registered in the NSDocument change
management. As an effect, the dirty status of window closebox isn't
set. But you can undo and redo from the Edit menu. You may think that
the answer is reverting to the old code but I can't remiscent any
change relevant for this problem.
What can be wrong? or what shall I do to check everything is OK? This
is what I have done so far:
* checked that the text view allows undo (programmatically in
awakeFromNib) and it is turned on.
* Checked if updateChangeCount is sent to the document. The answer is
no, updateChangeCount is never received when edits are done.
* Registering an observer for document's [self undoManager] that logs
all notification. There are no notifications received
* Checked that [myWindow undoManager] == [self undoManager] and yes
they are
* Checked if windowWillReturnUndoManager received. The answer is yes,
but this seems to be of no relevance for this issue since NSDocument
don't use windowWillReturnUndoManager. (Probably taken care by
NSWidnowController?)
* ensured the Nib file format is "10.2 and Later Format"
* created a new Nib file from scratch in Interface Builder exactly
the same, but no difference.
I have not full insight of the Undo architecture wich make things
harder. But I suppose the problem is in the text view. But I can't
see what it is, and what to do.
Any help would be appricated. Very appricated. :)
Thanks
Rog
PS. I looked in the archive, and the issue "Undo without dirty
document?" is my problem.
http://www.cocoabuilder.com/archive/message/cocoa/2006/5/14/163488
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden