• 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
Re: NSUndoManager -removeActionsWithTarget: does nothing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUndoManager -removeActionsWithTarget: does nothing


  • Subject: Re: NSUndoManager -removeActionsWithTarget: does nothing
  • From: Jeremy Dronfield <email@hidden>
  • Date: Fri, 5 Mar 2004 19:05:44 +0000

Sorry - that should be -removeAllActionsWithTarget:. An error in my post, not in my code!

Any suggestions anyone?
- Jeremy

On 5 Mar 2004, at 11:36 am, Jeremy Dronfield wrote:

With inestimable and very patient help from Dustin, I'm close to surmounting my problems with undo management for multiple text views. My trouble now comes down to one issue: I can't get -removeActionsWithTarget: to work. I'm implementing it in the -dealloc method of the delegate of one of my views (the one in the drawer attached to my main window). When my drawer closes, its delegate calls the removeActions method, but the undos remain on the stack. These undos are of the simple "Undo Typing" variety. I've tried passing various targets - self, [self myTextView] etc - and various receivers - [self undoManagerForTextView:myTextView], [[myTextView window] undoManager] etc, but none has any effect.

The problem seems to be with the receiver/target formulation rather than the undo manager itself, since substituting a simple [[self undoManagerForTextView:myTextView] removeAllActions] behaves exactly as advertised, neatly removing all undos for both views. Another possibility - does this method only remove undos registered explicitly with -prepareWithInvocationTarget or -registerUndoWithTarget?

-Jeremy

========================================
email@hidden

theLocustFarm.net:
- fractious fiction at http://freespace.virgin.net/jeremy.dronfield
========================================
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >NSUndoManager -removeActionsWithTarget: does nothing (From: Jeremy Dronfield <email@hidden>)

  • Prev by Date: Re: Passing C Style Function Callbacks in Cocoa
  • Next by Date: Re: Passing C Style Function Callbacks in Cocoa
  • Previous by thread: NSUndoManager -removeActionsWithTarget: does nothing
  • Next by thread: Capture "Space" key event
  • Index(es):
    • Date
    • Thread