raymondasselin at sympatico.ca
Mon Apr 22 01:02:55 UTC 2002
Le 2002/04/20 à 20:26, Hannes Hirzel <hannes.hirzel.squeaklist at bluewin.ch> à écrit:
>I'm trying to write a class comment for 3.2g for the class TextStream.
>The following is my first attempt. What do you think?
>Actually the interface TextStream has seems to me a bit clumsy?
>There is only one user of TextStream.
>End of class comment
Hannes I like this example because we know what can be done with this Class and what is his
But for the text I just can say that I¹m a bit worry of HELLO WORD¹ may be you can just use the
following or whatever you prefer.
stream _ TextStream on: (Text new: 200).
stream nextPutAll: 'Squeak '.
stream withAttribute: TextColor red do: [ stream nextPutAll: 'TextStream! '].
stream withAttribute: TextEmphasis bold do: [ stream nextPutAll: 'How
easy it is, '].
stream withAttributes: (Array with: TextEmphasis italic with: TextColor
blue) do: [ stream nextPutAll: ' to use! '].
(TextMorph new contents: stream contents) openInWorld
More information about the Squeak-dev