links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Last updated at 5:05 pm UTC on 4 October 2019
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 5.3a)

 ProtoObject #()
	Object #()
		Collection #()
			SequenceableCollection #()
				ArrayedCollection #()
					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:

		string: string
		runs: runArray

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