Posted 16 June 2020, 4:35 am EST
I have an application that has multiple spreads and other functionality outside of spread. I don’t want to have separate undo managers for each spread. Rather I want one global undo manager. This way the user doesn’t have to focus on a specific spread to undo an action. Their last action will be undone regardless of their focus.
To achieve this I would like to request a new feature for spread. Can you add the capability to register a callback function to a spread’s undoManager? This callback function needs to be called whenever a command is added to the undoManager’s undo stack. The function needs to be passed the command and the spread itself. The idea is that I will use this to build up my global undo stack.
FYI, currently I am implementing this by proxying the undo stack array itself and putting my callback in a setter. I’d like to use a formally supported method though.
Please let me know if this is something you can add. I’m open to other suggestions for how to handle the problem.