• 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
undo in NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

undo in NSTextField


  • Subject: undo in NSTextField
  • From: John Nairn <email@hidden>
  • Date: Tue, 7 Jun 2005 14:50:47 +0200

I noticed that undo is now on by default for NSTextField (is that new in Tiger?) but when a window has multiple fields, the undo does not work between fields. I thought I should remove all undo actions for the field editor whenever the text editing ends and is committed to the internal model. Here is what I used after finding the field editor for the NSTextField

[[self undoManager] removeAllActionsWithTarget:[fieldEditor textStorage]];

This same method worked to remove undo actions for my own NSTextView, but it did not work to the fieldEditor. How do I remove undo actions for the recently edited NSTextField?

I have tried looking for other targets such as

1. fieldEditor itself
2. The window
3. The NSText * received in textShouldEndEditing

but nothing works. I also tried to read the target of the recent undo, but that information does not appear available in NSUndomanager.

---------------
John Nairn (1-801-581-3413, FAX:1-801-581-4816)
Web Page: http://www.mse.utah.edu/~nairn
 _______________________________________________
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

  • Prev by Date: osx86 and frameworks: the next question
  • Next by Date: Re: Manual for Core Data, is there any?
  • Previous by thread: Re: osx86 and frameworks: the next question
  • Next by thread: How to look in a applications dictionary...
  • Index(es):
    • Date
    • Thread