TextMorph >> string:fontName:size:wrap: bug?

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

TextMorph >> string:fontName:size:wrap: bug?

Sean P. DeNigris
Administrator
I assumed that this method would set the contents of my TextMorph with the given arguments.  However, the contents are set before the font is changed:
string: aString fontName: aName size: aSize wrap: shouldWrap
       
        shouldWrap
                ifTrue: [self contentsWrapped: aString]
                ifFalse: [self contents: aString].

        self fontName: aName size: aSize
Shouldn't this be:
string: aString fontName: aName size: aSize wrap: shouldWrap
       
        self fontName: aName size: aSize.

        shouldWrap
                ifTrue: [self contentsWrapped: aString]
                ifFalse: [self contents: aString].

or am I missing something?

Thanks,
Sean

p.s. is there a good reference for fonts?  I find the available classes (and no class comments) dizzying - LogicalFont, TT..., FreeType...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: TextMorph >> string:fontName:size:wrap: bug?

Stéphane Ducasse
I do not know, Sean. Probably We should really clean up that part too.

stef
On May 1, 2010, at 8:33 PM, Sean P. DeNigris wrote:

>
> I assumed that this method would set the contents of my TextMorph with the
> given arguments.  However, the contents are set before the font is changed:
>
>
>> string: aString fontName: aName size: aSize wrap: shouldWrap
>>
>> shouldWrap
>> ifTrue: [self contentsWrapped: aString]
>> ifFalse: [self contents: aString].
>>
>> self fontName: aName size: aSize
>>
>
> Shouldn't this be:
> string: aString fontName: aName size: aSize wrap: shouldWrap
>
> self fontName: aName size: aSize.
>
> shouldWrap
> ifTrue: [self contentsWrapped: aString]
> ifFalse: [self contents: aString].
>
> or am I missing something?
>
> Thanks,
> Sean
>
> p.s. is there a good reference for fonts?  I find the available classes (and
> no class comments) dizzying - LogicalFont, TT..., FreeType...
> --
> View this message in context: http://forum.world.st/TextMorph-string-fontName-size-wrap-bug-tp2122277p2122277.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: TextMorph >> string:fontName:size:wrap: bug?

Sean P. DeNigris
Administrator
Okay, I'll file a bug and fix it soon...

Sean
Cheers,
Sean