Re: Switching NSDocument's undo manager
Re: Switching NSDocument's undo manager
- Subject: Re: Switching NSDocument's undo manager
- From: Gideon King <email@hidden>
- Date: Fri, 6 Jan 2006 03:54:36 +1000
You know, there's nothing like posting to the list to make you wake
up! You know who the culprit was? It was me! And I wasn't looking at
what I thought I was looking at.
Sorry to waste your time...
Gideon King
email@hidden
On 06/01/2006, at 3:38 AM, Gideon King wrote:
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