I have a simple document-based application that simply creates a custom XML file. It uses an Outline View to navigate the XML document. When an item in the Outline View is selected a custom view is displayed as a sub view of the document view that allows the user to enter in data. On one of the views has a NSTextField. It has its "Allows Undo" flag set. I tested to ensure the undoManager is called on the NSDocument when the editing is completed. So the control seems to be bouncing through the First Responder as it should.
In the IBAction I use the ActionName so it will display correctly in the menu. Now here is the problem. Not only is the ActionName not displayed in the menu, but clicking undo doesn't reverse the action taken on the NSTextField but the action registered just before it. Is there something I overlooked when setting up undo with NSTextField?
(IBAction)textFieldChanged:(id)sender{
...some code here...
[[self undoManager]setActionName:@"Change Text"];
}
Thanks in advance, Rob