Some ComposedText changes in VW7.4.1 vs VS7.3 and before ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Some ComposedText changes in VW7.4.1 vs VS7.3 and before ...

Dennis smith-4
I have, in a number of places, code like this
    txt := self stringValue asComposedText.
    style := txt textStyle copy.
    style ... (make some changes)
    txt compositionWidth: anInteger.
    txt style: style

In VW7.3.1 and before, this "worked".  The text was reformatted
(wrapped, centered, rightFlushed ...) as specified.  However, in
VW7.4.1 the last line above invokes "fitCompositionWidth" instead of
"composeAll", and the "fitCompositionWidth" sees the ivar "fitWidth" as true
so it resets the width to DefaultCompositionWidth, and the reformatting
doesn't do much since the width is now very small.

I can perhaps see that fitWidth defaulted to true, but if I change the
compositionWidth (second last line above), should that not be setting
    fitWidth := false
???
The only way around this is to build the ComposedText using one of the
more complex
creation methods such as
    ComposedText withText: aText style: aTextStyle compositionWidth: aWidth
which seems a bit of overkill???



--
Dennis Smith                        [hidden email]
Cherniak Software Development Corporation       +1 905.771.7011
400-10 Commerce Valley Dr E                Fax: +1 905.771.6288
Thornhill, ON Canada L3T 7N7    http://www.CherniakSoftware.com