Eliot Miranda uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-eem.179.mcz==================== Summary ====================
Name: MorphicExtras-eem.179
Author: eem
Time: 3 August 2016, 7:42:04.74973 pm
UUID: 7e0dd147-e862-4ad7-9218-8de41bb8b81b
Ancestors: MorphicExtras-tfel.178
Use allInsyancesDo: instead of someInstance/nextInstance to remove grab commands from MorphExtensions.
P.S. to improve start-up time we might consider moving these to snapshot time, if at all possible.
=============== Diff against MorphicExtras-tfel.178 ===============
Item was removed:
- ----- Method: CommandHistory class>>forgetAllGrabCommandsFrom: (in category 'system startup') -----
- forgetAllGrabCommandsFrom: starterInstance
- "Forget all the commands that might be held on to in the properties dicitonary of various morphs for various reasons."
-
- | object |
- object := starterInstance.
- [
- [nil == object] whileFalse: [
- object removeProperty: #undoGrabCommand.
- object := object nextInstance].
- ] ifError: [:err :rcvr | "object is obsolete"
- self forgetAllGrabCommandsFrom: object nextInstance].
-
- "CommandHistory forgetAllGrabCommandsFrom: MorphExtension someInstance"
- !
Item was changed:
----- Method: CommandHistory class>>resetAllHistory (in category 'system startup') -----
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].
MorphExtension withAllSubclassesDo:
+ [:morphExtensionClass|
+ morphExtensionClass allInstancesDo:
+ [:object| object removeProperty: #undoGrabCommand]]
- [:mexc|
- self forgetAllGrabCommandsFrom: mexc someInstance]
"CommandHistory resetAllHistory"
!