[squeak-dev] [Bug] TextMorphs lose history after switching to another project | #releaseCachedState

christoph.thiede at student.hpi.uni-potsdam.de christoph.thiede at student.hpi.uni-potsdam.de
Wed Feb 23 13:06:25 UTC 2022


Hi all,

here is a bug:

1. Open a workspace
2. Enter X
3, Create & enter a new Morphic Project
4. Enter the parent project again
5. In the workspace, press Cmd + Z
Expected behavior: X is removed from the workspace.
Actual behavior: Nothing happens, the history of the editor is lost.

This apparently happens because via MorphicProject>>#finalExitActions: and PasteUpMorph>>#sleep, #releaseCachedState is sent to every textMorph in the world. This causes the editor being set to nil, erasing its meaningful state, i.e., the history, entirely.

I wonder what would be the right way to fix this bug. Normal text morph do indeed want to forget their history, but TextMorphForEditViews shouldn't do so, I guess. Should we preserve the history in the morph before releasing the editor? Or would you propose a different approach to the fix?

Thanks in advance & have a nice week!

Best,
Christoph

---
Sent from Squeak Inbox Talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220223/56d6d40e/attachment.html>


More information about the Squeak-dev mailing list