Hi Stephen, you might also be interested in these fixes I applied to get embedded Morphs into Text working, which is heavily used by Maui. I didn't remove TextAnchor>>#compositionScanner:, maybe that would have solved all of the problems; I doubt it.
There is still one bug... errr, "feature" left: If a Morph is the first "Character" of a line, it will be centered. If you place a space or any other character on that same line, it flows naturally as a character.
- Chris
On Fri, Dec 19, 2008 at 7:10 AM, Stéphane Rollandin lecteur@zogotounga.net wrote:
- But is also unveils a rendering glitch. Now that invisible characters
are being printed as boxes, the Workspace now prints one of those empty boxes underneath your embedded morph. This is probably because an embedded morph is represented in a Text object by the Character value 2.
here is a handy method wrapping all is needed for anchoring a morph, returning a Text ready for display; the empty boxes are rendered invisible by setting their color to transparent.
Morph>>asAnchoredText
^ (Character value: 1) asText addAttribute: (TextAnchor new anchoredMorph: self) from: 1 to: 1; addAttribute: (TextColor color: Color transparent) from: 1 to: 1.
Stef