[squeak-dev] [fix] Request for help: TextAnchor display broken in 3.9 and newer

Chris Muller asqueaker at gmail.com
Sun Dec 21 16:52:53 UTC 2008


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 at 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
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FixesForGraphics-ar.39.1.cs.gz
Type: application/x-gzip
Size: 1560 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20081221/09929117/FixesForGraphics-ar.39.1.cs.bin


More information about the Squeak-dev mailing list