[squeak-dev] Proposal: Morphs in Text

Chris Muller asqueaker at gmail.com
Thu May 30 01:48:13 UTC 2019

Hi Patrick,

It breaks something with layout of non-ascii characters.   Try
selecting a binary file in the FileBrowser.  Warning:  save your image first.

 - Chris

On Tue, May 28, 2019 at 11:27 AM <patrick.rein at hpi.uni-potsdam.de> wrote:
> Hi everyone,
> please find attached a change set which includes:
> 1.) Some fixes to the Scanner infrastructure to support Morphs in Text better
> 2.) Improvements to describe how a Morph should be aligned with regard to the text. Relevant methods on Morph are:
> #textAnchorVerticalAlignment:
> #textAnchorPadding:
> #textAnchorConsumesHorizontalSpace:
> You can see an example by executing the body of the test:
> TextAnchorTest>>#testHavingAnAnchorCanBeAlignedDifferently
> !Warning: As this touches Scanner code a lot, loading this change set might make your image unresponsive!
> I would like to point out that the test cases are preliminary and a few of the methods still require polishing. Nevertheless, I would like to ask for comments on the change set, in particular regarding:
> 1.) Should the alignment information be stored in the Morph or the TextAnchorAttribute? Currently the information is stored in the Morph which parallels LayoutProperties.
> 2.) Is using caseOf: in Scanner code fine? I suspect it to be quite expensive which is probably not a good thing in Scanners?
> 3.) Should the cursor allow users to navigate (or select?) the "start of header" character that is used to denote the text anchor placement?
> 4.) Does anyone remember / know what the textAnchorType was intended for? The previous implementation largely ignored it and this one does so too.
> Thanks and best wishes,
> Patrick

More information about the Squeak-dev mailing list