'From Squeak3.3alpha of 15 February 2002 [latest update: #4870] on 16 May 2002 at 1:53:42 pm'! "Change Set: ForgetGrabCmds-tk Date: 16 May 2002 Author: Ted Kaehler The recent set of changes leaves some obsolete objects. CommandHistory class>>forgetAllGrabCommandsFrom: sends isMorph, which gets an error. This fix ignores the obsolete instances, but is tricky because it has to go fast!! Note how I limited the number of times ifError: will be executed."! !CommandHistory class methodsFor: 'system startup' stamp: 'tk 5/16/2002 13:52'! forgetAllGrabCommandsFrom: starter "Forget all the commands that might be held on to in the properties dicitonary of various morphs for various reasons." | object | object _ starter. [ [0 == object] whileFalse: [ object isMorph ifTrue: [object removeProperty: #undoGrabCommand]. object _ object nextObject]. ] ifError: [:err :rcvr | "object is obsolete" self forgetAllGrabCommandsFrom: object nextObject]. "CommandHistory forgetAllGrabCommandsFrom: true someObject" ! ! !CommandHistory class methodsFor: 'system startup' stamp: 'tk 5/16/2002 13:38'! resetAllHistory "Reset all command histories, and make all morphs that might be holding on to undo-grab-commands forget them" self allInstancesDo: [:c | c resetCommandHistory]. self forgetAllGrabCommandsFrom: self someObject. "CommandHistory resetAllHistory" ! ! CommandHistory class removeSelector: #forgetGrabCommandsInAllMorphs!