Feature request for undoManager

Posted by: tim.guglielmo on 16 June 2020, 4:35 am EST

  • 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.

  • Posted 17 June 2020, 12:54 am EST

    Hi,

    We have added an enhancement request on your behalf to support this feature. The internal tracking id for this issue is SJS-4671. We will keep you posted with updates regarding the same.

    Regards

  • Posted 21 June 2020, 3:57 pm EST

    Hi Tim,

    The dev team wants to make sure that they have understood the requirement clearly. Please confirm if following is your exact requirement or is it something different:

    • There are multi spread instance in your app

    • Focus in Spread1, type “AAA” in Spread1.

    • Focus in Spread2, Type “BBB” in Spread2.

    • Focus in Spread1, type “CCC” in Spread1

    Then,

    • Undo, Focus in Spread1, CCC undo.

    • Undo, Focus switch to Spread2, BBB undo.

    • Undo, Focus switch to Spread1, AAA undo

    This is how global undo stack works in MS Excel too.

  • Posted 22 June 2020, 1:27 am EST

    Sharad,

    Yes you have it correct. Keep in mind my application contains actions that are outside of any spread also. I want to make these actions undoable as well so this is why I’m thinking that I handle my own undo manager, but I need to be able to hook into the spread actions and/or undoManager.

  • Posted 22 June 2020, 4:28 pm EST

    Thank you for the additional info. I’ve shared it with the dev team.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels