[squeak-dev] Another strange behavior of FontChooser

Marcel Taeumel marcel.taeumel at hpi.de
Wed Apr 27 15:14:43 UTC 2022


Quick-fix via Morphic-mt.1975. Yet, personally I do not like to pull off such Smalltalk magic. It makes code less readable. :-)

Best,
Marcel
Am 27.04.2022 17:06:36 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
Hi Nicolas --

The FontChooser is operating on an instance in TextEditor. This is bad. The typical lifespan of a text editor is rather short. That editor points to a then outdated paragraph. Hmpf.

Best,
Marcel
Am 26.04.2022 00:22:33 schrieb Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
Ah, got it, I edited the text between steps 5 & 6
I enclosed some selection with [ ] because original text did not have some, because I remembered that the problem previously appeared after I selected text inside brackets...

Le mar. 26 avr. 2022 à 00:17, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com [mailto:nicolas.cellier.aka.nice at gmail.com]> a écrit :

Following the same steps, I cannot reproduce, though I could get this behavior a few times.

Ah, something I did is resize the window in-between, because the text selection is not correctly displayed when fonts are changed.
Ater resizing the window, new text selection is ignored...

Or maybe any other action that may reset the paragraph or some other state...


Le mar. 26 avr. 2022 à 00:06, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com [mailto:nicolas.cellier.aka.nice at gmail.com]> a écrit :

The one with cmd+k this time:

1. open a workspace, type some text, select some
2. open FontChooser thru Cmd+k
3. select some font, apply, so far so good
4. without closing the FontChoosed, select aome other Text
5. select another font, Apply, still good

now the unexpected behavior:

6. [select some block by double clicking after opening square bracket]
7. select another font, apply

Err! the font is applied to the previous selection!

8. type some Text, don't select any,
9. select another font, apply

Err! still apply to the previous selection

10. close the FontChooser

Err! many debuggers open in TextEditor>>closeTypeIn
myHistory current (nil) doesNotUnderstand: #contentsAfter:
The image survives only because the debuggers finally cover the broken Morph when enough are open (a good idea to tile them !)


Definitely broken mutated states...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220427/c2618be6/attachment.html>


More information about the Squeak-dev mailing list