Managing undo operations across components
Hi,
I've been able to share an IUndoManager between various RichEditableText components using the interactionManager property of their text flows and the EditManager class. This works great for undoing and redoing -- except when a component is removed from the display list.
When a text field is re-added something odd seems to happen to its text flow generation property, which causes a mismatch when compared in the EditManager, thereby preventing the next operation to undo or redo.
Are operations being applied to the text flow simply by removing and re-adding it to the display list? Or what's affecting this count?
The failure is repeatable, and in each case the text flow's generation value is greater than the operation's endGeneration (in performUndo()) or beginGeneration (in performRedo()).
What can be done to freeze the text flow or its generation value, or is there a better way of keeping the EditManager operation validation happy?
Many thanks,
Waj
Flex 4.5.20967
