• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Undo/redo in AIR application

Advocate ,
Sep 20, 2014 Sep 20, 2014

Copy link to clipboard

Copied

I've been looking at the undoManager and not understanding some basic principles, obviously.

Situation, I have an AIR desktop app and want to include Undo/Redo in the menus. When I do that, it overrides the typically expected behavior of control-z and control-y, so I assume that I have to manage that myself now. I've been able to handle cut/paste overrides by capturing the menu event and using NativeApplication.nativeApplication.copy() paste() etc, but there's nothing comparable for undo/redo. So that took me on a quest looking at the UndoManager, which appears to be my ticket for managing Spark TextInput text operations. However, if I trap the menu event for undo and look at the undoManager.canUndo() after deleting text, it's always false.

I'm missing a step somewhere. Can someone point me to an example or a better explanation of how to manage undo/redo in an AIR application, if you want to override the built-in menu items?

Thanks.

TOPICS
Development

Views

199

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines