• 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
My NSUndoManager subclass is broken on SL - how to fix?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

My NSUndoManager subclass is broken on SL - how to fix?


  • Subject: My NSUndoManager subclass is broken on SL - how to fix?
  • From: Graham Cox <email@hidden>
  • Date: Thu, 3 Sep 2009 00:31:34 +1000

My app subclasses NSUndoManager, so that it can provide a couple of extra things to the app, namely, task coalescing and a change count that I track to see if certain operations which come from a wide variety of places actually submitted an undo task (and hence the undo manager itself is the one central place that knows about them).

On 10.6, While Undo is still generally working, the stuff my class added are not. In trying to track this down, I was getting some very puzzling results, like none of my breakpoints were firing in my subclass's override for -forwardInvocation. Then I spot this note in the docs:

"On Mac OS X v10.6 and later, this method (- prepareWithInvocationTarget:) returns a proxy object for the receiver that forwards all messages to the receiver as undo operations."

OK, I understand why that was done, but how can I alter my code so it works for this non-backwards-compatible situation? It seems this mysterious proxy object is forwarding to some private method of NSUndoManager that I can't override, so it's bypassing my very useful additions. I need to know where I can hook into whatever this proxy object delivers the task to the U/M.

Any ideas?

--Graham




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • [Workaround] Re: My NSUndoManager subclass is broken on SL - how to fix?
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: how to get a managedObjectContext in a nib file
  • Next by Date: Re: how to get a managedObjectContext in a nib file
  • Previous by thread: Re: NSScroller width
  • Next by thread: [Workaround] Re: My NSUndoManager subclass is broken on SL - how to fix?
  • Index(es):
    • Date
    • Thread