• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Switching NSDocument's undo manager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Switching NSDocument's undo manager
      • From: Gideon King <email@hidden>
  • Prev by Date: Re: NSOutlineView misdrawing during drag
  • Next by Date: Re: hey, who took away nested functions?
  • Previous by thread: Re: hey, who took away nested functions?
  • Next by thread: Re: Switching NSDocument's undo manager
  • Index(es):
    • Date
    • Thread