_________________ ________________________
| UndoableCommand | | PluggableButtonMorph |
|—————–| |________________________|
| actionBlock | /\
| undoBlock | /__\
|—————–| |
| actionBlock: | |
| undoBlock: | _______|___________
| execute | 1 1 | PluggableMenuItem |
| undo |<-----------|-------------------|
|_________________|command | label |
/\ |——————-|
/__\ | onCommand: (class)|
| |___________________|
|
_____|_______ ______________
| SaveCommand | | Document |
|————-| 1 1|————–|
| |——–>| contents |
|————-| doc |————–|
| execute | | save |
| undo | |______________|
|_____________|
| Undo is good to add, but there are a couple of patterns that this problem just screams out for. BTW, I agree with b-2, but "robust" isn't the word for that. Mark Guzdial |
| To quote from page six of the text: "The robustness comes from the fact that the loss of an object does not damage other objects, except for those that rely on the services or the roles of the lost object." If robustness isn't the word to describe that kind of stability then what is? Bryan Kennedy |
| Imagine a solution in FORTRAN, and then in some OO language. What will be different about the two solutions? There is at least one very simple difference that is important. -Lex Spoon |
| can we get a concrete answer to this one? I've looked over the slides but I still am a little confused as to how these design patterns work and why you would want to use one over another Thanks |