Switching NSDocument's undo manager
Switching NSDocument's undo manager
- Subject: Switching NSDocument's undo manager
- From: Gideon King <email@hidden>
- Date: Fri, 6 Jan 2006 03:38:22 +1000
Hi all, I am trying to switch the undo manager that my NSDocument
subclass uses. In the init method of my NSDocument subclass, the
second line (after self = [super init]) sets the undo manager to my
custom class.
This works fine when I just create a new document, but when I load
one, my undo manager is thrown away and replaced with an NSUndoManager.
OK, I thought , I'll fix you, and implemented an override of
setUndoManager which would only pass the message along to NSDocument
if the class of the undo manager argument was my undo manager.
But someone somewhere has done something nasty and directly created
and set the undo manager in the NSDocument without calling the set
method.
So I thought I'd try to keep an eye on it with a watch point, and
catch the timing of when the deed was done, but the watchpoint went
out of scope, so I couldn't catch it.
Can anyone give me some clues as to how to find the culprit so I can
switch it back again?
Thanks
Gideon King
email@hidden
_______________________________________________
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