Last updated at 6:11 am UTC on 14 April 2018
Text is a class similar to the class String. But the Text objects may include emphasis attributes such as italics or bold. So Text is a class which "wraps" an instance of String and attributes.
Every character may have its own attributes. The implementation is done in a space efficient way. The information is stored in a runs instance variable. Only the necessary attributes are stored and each change is indicated.
Class hierarchy: (Squeak 3.3a-4664 .. Squeak 6.0a)
Text #('string' 'runs')
A way to create a Text object from a string (no emphasis then):
Text fromString: 'hello world!'
With emphasis see: TextStream.
If the runs are available:
Or from HTML
Convert HTML to Text
Boris Gaernter sent some additional documenation to the mailing list on 12-June-2003; see TextStream
The Maui package contains a small word processor, see
MauiPage - mini text processor