[BUG]? Wrapping of morph's embedded in a TextMorp

Joerg Beekmann jbeekmann at attglobal.net
Wed Aug 29 16:37:18 UTC 2001


RE: [ANN] SWT 0.6 releasedI've been playing with embedding morphs in a TextMorph.  No matter how I embed the morph, by
pasting or programmatically I experience some strange behavior when wrapping. To see this evaluate the following:

morphAsText := Text
   string: '*'
   attribute: (TextAnchor new anchoredMorph: (TextFieldMorph new contents: 'data here'; yourself)).
text := (TextStream on: Text new)
 nextPutAll: 'This is the text before a morph: ';
 nextPutAll: morphAsText;
 nextPutAll: ' here is some text following the morph.';
 contents.
(PluggableTextMorph on: nil text: nil accept: nil)
 setText: text;
 openInWindow


Resize so everything is on one line then slowly narrow the window until the embedded TextFieldMorph just fits on the
first line. So far all should be okay. Narrow the window so the embedded morph just doesn't fit on the first line.
Notice how TextFieldMorph wraps but then indents itself by its own width!

To get a hint of what may be going on type a character just prior to the TextFieldMorph making sure there is no space
between them and repeat the resizing exercise. Seems if the $* which carries the TextAnchor attributes is at a line wrap
point the layout mechanisms are getting confused.

My image is #4282 with the HTML Table changes set 0.6 installed.

Joerg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010829/24c33648/attachment.htm


More information about the Squeak-dev mailing list