I think there are two potential approaches to undoers: 1. Impose a specific layout regardless of the current layout; 2. Reverse the changes made by the current layout.
I think that 1. would be the preferred approach but seems hard. Approach 2. should be fairly easy but won't be able to return to an arbitrary initial layout. Suppose the user makes the following change: L0 -> L1 - >L2. L2's undoer knows how to get back to L1. For L1 to know how to get back to L0, its undoer has to have been saved somewhere. That could be in a stack or dictionary, or in a Layout object. If the later, the Layout objects need to be saved somewhere. If in a dictionary, the system needs to know how to find the key. In a stack, the only knowledge needed is how to find and pop the stack. On Saturday, July 20, 2024 at 8:39:40 AM UTC-4 Edward K. Ream wrote: > On Sat, Jul 20, 2024 at 7:19 AM Thomas Passin <[email protected]> wrote: > >> I think the undoers should be pushed on a stack. > > > My idea was that undoers always reverted to the original (default) layout. > I still think this is a reasonable starting point. > > We can discuss this further after undoers are finished. > > Edward > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/5b8e7b3c-fb43-4e4f-a08e-0fa1e93d1e77n%40googlegroups.com.
