Yes, I am well aware. I studied in detail this documen, yet the undo/redo action messages don't seem to bubble up to NSApplication-subclass.If I implement them in my viewController, and have the validateMenuItems-function returns 'true' for them, the ARE called in the viewController. Walking the nextresponder chain from their, it goes:NSTableView -> NSClipView -> NSScrollView -> NSView -> NSView -> MyViewController -> MyNSWindow -> MyNSWindowControllerSee that there is no MYNSApplication at the end of the line?
Post
Replies
Boosts
Views
Activity
My question pertains to the flow of action messages coming from NSMenuItem. Currently, in my 'Edit' menu, there are menuItems that send cut(_:), copy(_:), paste(_:), delete(_:) to the first responder, and these actions are 'caught' by the viewController.In that same 'Edit' menu, there are 'Undo' and 'Redo'. Before discussing how to to use an NSUndoManager, I would like these actions to be 'caught' by my subclass of NSApplication. Weirdly enough, if the action is called something else then 'undo', like 'undo2', the actions DO make it to my NSApplication subclass. When the action is called 'undo', the action does NOT reach my NSApplication subclass.It seems as though some object somewhere along the responder chain consumes this action. Although checking the responder chain, none of the classes (or superclasses thereof) implement 'undo(_:)'.