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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to