摘要 |
A system and method provide for synchronous operation of linked command objects in a general purpose software application. The software application provides a user with a variety of operations that manipulate available data objects. The software application manages the data objects in a number of contexts. Each context manages the existence and execution of a number of command objects. Each command object operates on one or more data objects in its context. To support synchronous operations that affect the state of data objects in more than one context, command objects are linked to each other. When one command object is executed, the context of the command object identifies a command object linked to the executed command object and initiates the execution of the linked command object via the context that manages that command object. This synchronization allows for synchronous undo and redone operations. The delete states of the command objects are also synchronized. Deleting a command object destroys it, and prevents it from being undone. When one command object is deleted the command object linked thereto is also deleted, thereby preventing the linked command object from being independently undone resulting in an inconsistent state of the contexts.
|