undo in NSTextField
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) |
_______________________________________________
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